
DOPPELGANGER
Joined: Jul 19, 2014
whoops
|
Posted: Sep 18, 2014 09:44 PM
Msg. 1 of 6
I can't quite explain in words what I want, and I have attempted doing this myself but failed.
I want a capture point script, something like a Team Fortress 2 capture point, it is something like a King of the Hill plot with a timer on it that "captures" a point. I tried using a trigger volume as an "imaginary" King of the Hill plot, but I couldn't figure out how to make a variable saying who can capture this (AI, player) and another variable saying the seconds it takes to capture.
Furthermore, is there a way to make an AI want to capture said point? I tried just making them follow a path ending to the plot and giving them firing positions in the plot only.
Basically, the gametype I'm working on has an experimental and cliche name, "swarm". The player and a team of AI defend 2 plots that can be captured by the enemy AI. The first plot is easily defended by auto turret emplacements, lots of cover, and high capture time. If captured, it opens the last plot which will make the player lose the game, the capture time for the last point is significantly lower and there are less turret emplacements around the area.
Enemy wise, there are "cappers", AI that have only one purpose, to capture the point, and "supporters" AI that strive to kill the player and his allies and to destroy turrets.
#nojuanstealmeidea #isweardontdoit #dontudares #itsvalvesideasoitsmyidea
Less important scripts that I would like help with is a gravity lift script for the Halo 3 watchtower and an AI health regeneration script. I have no idea how to even attempt this. Edited by rangerDanger on Sep 18, 2014 at 09:45 PM Edited by rangerDanger on Sep 18, 2014 at 09:47 PM
|
|
|

RabbitFood
Joined: Aug 9, 2014
tripping a path through an internship
|
Posted: Sep 18, 2014 10:47 PM
Msg. 2 of 6
A while ago I recall someone trying to create a capture point similarly to what you're talking about and not being able to get it to work. I don't remember the exact response to the question, but I remember enough to know that the majority of the answer's didn't think it was possible. Sorry if this doesn't help, I just thought I'd mention it.
Then again I think it was before O.S. so I don't know.
|
|
|

DOPPELGANGER
Joined: Jul 19, 2014
whoops
|
Posted: Sep 18, 2014 10:50 PM
Msg. 3 of 6
Alright, thanks for trying to help mate! Much obliged! I tried to look for the thread you're talking about, but no luck. I at least need someone to tell me this is possible.
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Sep 19, 2014 01:16 AM
Msg. 4 of 6
(global boolean hill00_heldByPlayer true) (global boolean hill01_heldByPlayer true) (global boolean hill02_heldByPlayer false) (global boolean hill03_heldByPlayer false) (global short hill00_CapTime 0) (global short hill01_CapTime 0) (global short hill02_CapTime 0) (global short hill03_CapTime 0) (script continuous capturing (if hill00_heldByPlayer (if (volume_test_objects hill00 (ai_actors AIEncounter)) ;;If owned by players, check if AI are in. if so, up the time they've been in. (set hill00_CapTime (+ hill00_CapTime 1)) ) (if (volume_test_objects hill00 (players)) ;;If owned by AI, check if players in and up time. (set hill00_CapTime (+ hill00_CapTime 1)) ) ) (if hill01_heldByPlayer (if (volume_test_objects hill01 (ai_actors AIEncounter)) (set hill01_CapTime (+ hill01_CapTime 1)) ) (if (volume_test_objects hill01 (players)) (set hill01_CapTime (+ hill01_CapTime 1)) ) ) (if hill02_heldByPlayer (if (volume_test_objects hill02 (ai_actors AIEncounter)) (set hill02_CapTime (+ hill02_CapTime 1)) ) (if (volume_test_objects hill02 (players)) (set hill02_CapTime (+ hill02_CapTime 1)) ) ) (if hill03_heldByPlayer (if (volume_test_objects hill03 (ai_actors AIEncounter)) (set hill03_CapTime (+ hill03_CapTime 1)) ) (if (volume_test_objects hill03 (players)) (set hill03_CapTime (+ hill03_CapTime 1)) ) ) (if (>= hill00_CapTime 30) (begin (set hill00_captime 0) (set hill00_heldbyplayer (not hill00_heldbyplayer)))) ;;If they've got 30 capture points, swap ownership and clear capture time. (if (>= hill01_CapTime 30) (begin (set hill01_captime 0) (set hill01_heldbyplayer (not hill01_heldbyplayer)))) (if (>= hill02_CapTime 30) (begin (set hill02_captime 0) (set hill02_heldbyplayer (not hill02_heldbyplayer)))) (if (>= hill03_CapTime 30) (begin (set hill03_captime 0) (set hill03_heldbyplayer (not hill03_heldbyplayer)))) (sleep 30) ;;check once per second to award points
;;Optional printing (P0, or SP only) If you want MP, you need sv_say, and a cond block to print every possible point value. (set developer_mode 127) (cls) (if hill00_heldByPlayer (print "Player's hill00::")(print "AI's hill00::")) (inspect hill00_captime) (if hill01_heldByPlayer (print "Player's hill01::")(print "AI's hill01::")) (inspect hill01_captime) (if hill02_heldByPlayer (print "Player's hill02::")(print "AI's hill02::")) (inspect hill02_captime) (if hill03_heldByPlayer (print "Player's hill03::")(print "AI's hill03::")) (inspect hill03_captime) (set developer_mode 127) )
|
|
|

DOPPELGANGER
Joined: Jul 19, 2014
whoops
|
Posted: Sep 19, 2014 06:33 PM
Msg. 5 of 6
Thanks Kirbae! I'll test this out over the weekend, but one final question. Where it mentions "hill_CapTime 1", is '1' the variable controlling the cap time? That's the thing I don't get.
|
|
|

FtDSpartn
Joined: May 1, 2009
Verified AI.
|
Posted: Sep 19, 2014 07:21 PM
Msg. 6 of 6
Haven't done scripts in forever, but if I understand what part you're talking about, it adds one to the hill_CapTime every second or so, which is then checked to see if it equals 30, which THEN swaps ownership of the hill to the AI. Edited by FtDSpartn on Sep 19, 2014 at 07:21 PM
|
|
|
| |
|
|
 |
|