logic_compare cant fire 'FireUserX' ? [solved]
Quote from PortalCombat on July 8, 2011, 9:06 amHey there.
I was trying around with logic_compare and I need to fire the 'OnUser1'-Input on a logic_case.
But when I try to fire it, I get this error:
- Code: Select all
!! ERROR: bad input/output link:
!! logic_case(logic_case_test,FireUser1) doesn't match type from logic_compare(logic_compare_test)Output of the logic_compare:
OnNotEqualTo,logic_case_test,FireUser1,0,0.00But now the strange thing about it:
When I use a button or any trigger, instead of the logic_compare, it works!example: Output for prop_button:
OnPressed,logic_case_test,FireUser1,0,0.00 <<< this works perfect---
Now, Iam really confused about this error message.
Does anyone know how to fix this?Edit:
This problem is now solved, more or less, by just bypassing it with another trigger.
See last post of this thread for my final solution.
Hey there.
I was trying around with logic_compare and I need to fire the 'OnUser1'-Input on a logic_case.
But when I try to fire it, I get this error:
- Code: Select all
!! ERROR: bad input/output link:
!! logic_case(logic_case_test,FireUser1) doesn't match type from logic_compare(logic_compare_test)
Output of the logic_compare:
OnNotEqualTo,logic_case_test,FireUser1,0,0.00
But now the strange thing about it:
When I use a button or any trigger, instead of the logic_compare, it works!
example: Output for prop_button:
OnPressed,logic_case_test,FireUser1,0,0.00 <<< this works perfect
---
Now, Iam really confused about this error message.
Does anyone know how to fix this?
Edit:
This problem is now solved, more or less, by just bypassing it with another trigger.
See last post of this thread for my final solution.
Quote from ChickenMobile on July 8, 2011, 9:12 amYou shouldn't need to use the 'fire user' inputs. Try triggering a relay.
You shouldn't need to use the 'fire user' inputs. Try triggering a relay.
Quote from PortalCombat on July 8, 2011, 9:19 amchickenmobile wrote:You shouldn't need to use the 'fire user' inputs. Try triggering a relay.How could I fire a relay when I use:
- 1 logic_compare
- 3 logic_caseEach logic_case fires the 'compare'-input of the logic_compare and I need to know which one fired the compare.
Thats why I use '!caller' as TargetName... but thats not possible with logic_relay instead!?
How could I fire a relay when I use:
- 1 logic_compare
- 3 logic_case
Each logic_case fires the 'compare'-input of the logic_compare and I need to know which one fired the compare.
Thats why I use '!caller' as TargetName... but thats not possible with logic_relay instead!?
Quote from PortalCombat on July 9, 2011, 5:18 amI still have no clue on how to solve my problem.
I have tried around with logic_compare and logic_branch, but both of them
dont work as they should do. (both have different problems)- When I use logic_compare to fire 'FireUser1' I get an error in the portal 2 console.
- When I use logic_branch it fires itself, when the target entity is set to !caller.---
Can anyone tell me how to make this work, please:- 3 rooms with 1 trigger_multiple each
- the trigger fires a 'PickRandom' command to logic_case
- OnCase01 = room 1, OnCase02 = room 2, OnCase03 = room 3Now I want to know when any player is in any of these rooms:
- So I decided to use logic_compare with values 0 or 1
- Then I fire a 'compare' command from logic_case to logic_compare
- If the value is 1, I want to fire 'PickRandom' <<< this works fine
- If the value is 0, I want to fire 'FireUser1' <<< this does not work (error message in game)When I use logic_branch instead, I dont get an error, but it fires itself,
altough the target entity is set to !caller.
I still have no clue on how to solve my problem.
I have tried around with logic_compare and logic_branch, but both of them
dont work as they should do. (both have different problems)
- When I use logic_compare to fire 'FireUser1' I get an error in the portal 2 console.
- When I use logic_branch it fires itself, when the target entity is set to !caller.
---
Can anyone tell me how to make this work, please:
- 3 rooms with 1 trigger_multiple each
- the trigger fires a 'PickRandom' command to logic_case
- OnCase01 = room 1, OnCase02 = room 2, OnCase03 = room 3
Now I want to know when any player is in any of these rooms:
- So I decided to use logic_compare with values 0 or 1
- Then I fire a 'compare' command from logic_case to logic_compare
- If the value is 1, I want to fire 'PickRandom' <<< this works fine
- If the value is 0, I want to fire 'FireUser1' <<< this does not work (error message in game)
When I use logic_branch instead, I dont get an error, but it fires itself,
altough the target entity is set to !caller.
Quote from ChickenMobile on July 9, 2011, 5:55 amPortalCombat wrote:I still have no clue on how to solve my problem.I have tried around with logic_compare and logic_branch, but both of them
dont work as they should do. (both have different problems)- When I use logic_compare to fire 'FireUser1' I get an error in the portal 2 console.
- When I use logic_branch it fires itself, when the target entity is set to !caller.---
Can anyone tell me how to make this work, please:- 3 rooms with 1 trigger_multiple each
- the trigger fires a 'PickRandom' command to logic_case
- OnCase01 = room 1, OnCase02 = room 2, OnCase03 = room 3Now I want to know when any player is in any of these rooms:
- So I decided to use logic_compare with values 0 or 1
- Then I fire a 'compare' command from logic_case to logic_compare
- If the value is 1, I want to fire 'PickRandom' <<< this works fine
- If the value is 0, I want to fire 'FireUser1' <<< this does not work (error message in game)When I use logic_branch instead, I dont get an error, but it fires itself,
altough the target entity is set to !caller.Isn't !caller referring to itself when you are testing the value?
Like I said before instead of FIREUSER1. Trigger a relay which will have the outputs you need.
(ONFALSE relayname TRIGGER) rather than (ONFALSE !caller FIREUSER1). Both of the entities you are using can be named so I don't see your problem.
I have tried around with logic_compare and logic_branch, but both of them
dont work as they should do. (both have different problems)
- When I use logic_compare to fire 'FireUser1' I get an error in the portal 2 console.
- When I use logic_branch it fires itself, when the target entity is set to !caller.
---
Can anyone tell me how to make this work, please:
- 3 rooms with 1 trigger_multiple each
- the trigger fires a 'PickRandom' command to logic_case
- OnCase01 = room 1, OnCase02 = room 2, OnCase03 = room 3
Now I want to know when any player is in any of these rooms:
- So I decided to use logic_compare with values 0 or 1
- Then I fire a 'compare' command from logic_case to logic_compare
- If the value is 1, I want to fire 'PickRandom' <<< this works fine
- If the value is 0, I want to fire 'FireUser1' <<< this does not work (error message in game)
When I use logic_branch instead, I dont get an error, but it fires itself,
altough the target entity is set to !caller.
Isn't !caller referring to itself when you are testing the value?
Like I said before instead of FIREUSER1. Trigger a relay which will have the outputs you need.
(ONFALSE relayname TRIGGER) rather than (ONFALSE !caller FIREUSER1). Both of the entities you are using can be named so I don't see your problem.
Quote from PortalCombat on July 9, 2011, 6:16 amYou did not understand what Iam trying to do yet.
I have 3 rooms - each room has:
- 1 trigger_multiple
- 1 logic_case (with 3 cases, one for each room)
- 1 logic_branch to check if someone is in the room or not
- 1 logic relay (to trigger the final commands, like lights and sounds, etc.)Now lets say blue-player is in room 1
=> logic_branch_room_1 has a state of 1 (true) at this pointNow orange-player enters the trigger_multiple in 2nd room
=> at this point I want the orange player to go from room 2 into room 3
=> because blue-player already is in room 1 and orange is in room 3---
Thats what I was trying atm:
1.) trigger_multiple (onTouch)
2.) => logic_case (PickRandom) <<< choose any random room out of 3 (or more) rooms
3.) => logic_branch (Test) <<< check the state of the room (0 = empty, 1 = full)
4.) => if state is 0 => logic_branch triggers logic_case (FireUser1) => OnUser01 => logic_relay (Trigger)
4.) => if state is 1 => logic_branch triggers logic_case (PickRandom) => and we start at point 2 again, until we find an empty room.The relay at point number 4 is the relay of the selected room!
So I cant enter a name, I need to call it with !caller / !activator / however...I hop you know what I am trying... I cant find a solution myself.
btw: !activator ist the FIRST thing that triggers an input/output, isnt it?
=> when the player triggers the trigger_multiple, the player would be the !activator. right?
You did not understand what Iam trying to do yet.
I have 3 rooms - each room has:
- 1 trigger_multiple
- 1 logic_case (with 3 cases, one for each room)
- 1 logic_branch to check if someone is in the room or not
- 1 logic relay (to trigger the final commands, like lights and sounds, etc.)
Now lets say blue-player is in room 1
=> logic_branch_room_1 has a state of 1 (true) at this point
Now orange-player enters the trigger_multiple in 2nd room
=> at this point I want the orange player to go from room 2 into room 3
=> because blue-player already is in room 1 and orange is in room 3
---
Thats what I was trying atm:
1.) trigger_multiple (onTouch)
2.) => logic_case (PickRandom) <<< choose any random room out of 3 (or more) rooms
3.) => logic_branch (Test) <<< check the state of the room (0 = empty, 1 = full)
4.) => if state is 0 => logic_branch triggers logic_case (FireUser1) => OnUser01 => logic_relay (Trigger)
4.) => if state is 1 => logic_branch triggers logic_case (PickRandom) => and we start at point 2 again, until we find an empty room.
The relay at point number 4 is the relay of the selected room!
So I cant enter a name, I need to call it with !caller / !activator / however...
I hop you know what I am trying... I cant find a solution myself.
btw: !activator ist the FIRST thing that triggers an input/output, isnt it?
=> when the player triggers the trigger_multiple, the player would be the !activator. right?
Quote from ChickenMobile on July 9, 2011, 6:22 amSo it's coop? That would have been very good to know to begin with.
PortalCombat wrote:btw: !activator ist the FIRST thing that triggers an input/output, isnt it?
=> when the player triggers the trigger_multiple, the player would be the !activator. right?And if you did re-read my post I realised I misunderstood what you wrote and re-wrote an answer.
So are you trying to make sure that both bots are not in the same room? AND they will never meet each other when moving to the different rooms?
Post your vmf and I'll try to understand what you are doing.
So it's coop? That would have been very good to know to begin with.
=> when the player triggers the trigger_multiple, the player would be the !activator. right?
And if you did re-read my post I realised I misunderstood what you wrote and re-wrote an answer.
So are you trying to make sure that both bots are not in the same room? AND they will never meet each other when moving to the different rooms?
Post your vmf and I'll try to understand what you are doing.
Quote from PortalCombat on July 9, 2011, 6:30 amYes, when I trigger the 'Test' command of 'logic_branch' the !caller is the 'logic_branch'
=> Thats the problem I cant solve...Yes, it is a coop map. Sorry for not mentioned it before.
Check your Private Messages please, I have send you my vmf file.
Yes, when I trigger the 'Test' command of 'logic_branch' the !caller is the 'logic_branch'
=> Thats the problem I cant solve...
Yes, it is a coop map. Sorry for not mentioned it before.
Check your Private Messages please, I have send you my vmf file.
Quote from PortalCombat on July 9, 2011, 8:24 amWhile waiting for the next PM, I found a way to prevent the !activator
being the first object that triggers.I now have an working trigger like this:
1.) player triggers 'trigger_multiple'
2.) 'trigger_multiple' triggers 'PickRandom' at 'logic_case'
3.) 'logic_case' chooses any room
4.) 'logic_case' triggers 'RegisterEntity' at 'logic_register_activator'
5.) 'logic_case' triggers 'FireRegisteredAsActivator1' at 'logic_register_activator'
6.) 'logic_case' triggers 'compare' at 'logic_compare'
7.) 'logic_compare' has the value "0" for empty room and value "1" for player in that room- If value = 0 => 'logic_compare' triggers 'PickRandom' to target '!Activator' as long as the compare is equal.
(which in this case, is the registered 'logic_case' !!)- If value = 1 => 'logic_compare' triggers 'InValue' to target '!Activator'
(which in this case, is the registered 'logic_case' !!)9.) triggering 'InValue' to 'logic_case' triggeres the 'OnDefault' and I can trigger my 'logic_relay' at this point.
It works fine now, and I can edit my map and use it this way.
Thanks for your help anyways - I think there are several ways, too.Regards
PortalCombat
While waiting for the next PM, I found a way to prevent the !activator
being the first object that triggers.
I now have an working trigger like this:
1.) player triggers 'trigger_multiple'
2.) 'trigger_multiple' triggers 'PickRandom' at 'logic_case'
3.) 'logic_case' chooses any room
4.) 'logic_case' triggers 'RegisterEntity' at 'logic_register_activator'
5.) 'logic_case' triggers 'FireRegisteredAsActivator1' at 'logic_register_activator'
6.) 'logic_case' triggers 'compare' at 'logic_compare'
7.) 'logic_compare' has the value "0" for empty room and value "1" for player in that room
- If value = 0 => 'logic_compare' triggers 'PickRandom' to target '!Activator' as long as the compare is equal.
(which in this case, is the registered 'logic_case' !!)
- If value = 1 => 'logic_compare' triggers 'InValue' to target '!Activator'
(which in this case, is the registered 'logic_case' !!)
9.) triggering 'InValue' to 'logic_case' triggeres the 'OnDefault' and I can trigger my 'logic_relay' at this point.
It works fine now, and I can edit my map and use it this way.
Thanks for your help anyways - I think there are several ways, too.
Regards
PortalCombat
