Need some help with conditional logic

Oct 6, 2008
1,947
445
Hi Everyone (Especially coders!),

I've taken my concept about as far as I can with my coding knowledge - perhaps you can help.

I'm using a lot of trickery here :sneaky2: to give it the impression that a lot of other things are happening with the visuals :) it's a lot of basic coding.

What I need help with is:

Red HUD seems to have a HUD marker at the start that blue doesn't :confused: Can't seem to find out why.

I need some conditional logic:

Red/Blue Cart Passes X Disable Pushzone
If Both RED and Blue have teleported to X then activate both pushzones
If Both RED and Blue have teleported to X - Open the Door

Or Activate New Train and Parent the model to it for the final cart.

Never done the conditional logic before:unsure:

Also with this type of setup, can you do a multi-stgae version and are you still limited to the 8 cp total or is that 8 per round? Not entirely sure as this is still experimental :)

Download link to bsp and vmf is here: http://forums.tf2maps.net/downloads.php?do=file&id=5989

Note: push either cart 1st but don't enter the room or you'll unsync the HUD Display :(
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Red/Blue Cart Passes X Disable Pushzone
on the path track:
OnPass | pushzone_red | Disable
OnPass | pushzone_blu | Disable

If Both RED and Blue have teleported to X then activate both pushzones
I'm not sure what you mean by "red teleported to X" so I'll assume you mean the cart teleporting to a path_track. In which case I think OnPass works when it gets there, so:
Use a logic_relay that is disabled initially. If it's the exact same path track:

OnPass | both_teleported_relay | enable | | 0.1 | OnceOnly
OnPass | both_teleported_relay | trigger | | 0.0

The enable is fired after the trigger, so the first time it happens it tries to trigger it, fails, then enables it ready for the second teleported majigger

If they're two separate path_tracks, just have those exact outputs on both, the enable input sent by the second path_track will just do nothing, so no harm done.

Have your pushzone enabling stuff inside the relay

If Both RED and Blue have teleported to X - Open the Door
Exact same as before, just stick your door opening stuff in the logic_relay
 
Oct 6, 2008
1,947
445
Thanks a lot YM! I've been fooling around with it but couldn't figure it out - will try your version and let you know how it works :)
 
Oct 6, 2008
1,947
445
Thanks YM - the coding is working well.

I'm having a problem with getting the control point hologram (end path A/B)) to switch from red to blue without triggering a victory (bug) sometimes it works (no victory which is what I want) to bugging out with a victory. The last cap works fine in every case (victory) but the model doesn't change - I think the relay system you gave me might do the trick - will try it out later.

Path Tracks
OnPass | cp_red_A | SetOwner | 3 | 0.0
OnPass | cp_blue_A | SetOwner | 3 | 0.0

Last Cap node
OnPass | plr_red_pushzone | CaptureCurrentCP | 3 | 0.0
OnPass | plr_red_pushzone | CaptureCurrentCP | 3 | 0.0
OnPass | Game_end | SetOwner | 3 | 0.0

team_control_point_round
Name: plr_round_A
Control points this round: cp_red_A cp_blue_A Game_End

I'm still getting an extra round hub maker of red's path for some reason too - still looking.
 
Last edited:
Oct 6, 2008
1,947
445
Disregard - cap point thing - I found out that with this modified code it will work best if I hide the model instead of changing the owner.

Is someone could look at the code I currently have and give me a clue as to why the extra HUD marker is appearing it would be appreciated :)