A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »sp ending

Author Topic: sp ending (5 messages, Page 1 of 1)
Moderators: Dennis

Somone77
Joined: Aug 25, 2007


Posted: Mar 15, 2008 11:42 PM    Msg. 1 of 5       
well i made a topic like this before and i forgot the script for it here is what im asking: when i end my sp map i want to have a script command so when they press a key say (as an example) i wanted it to reset the map. What would be the command for that like i know it had the work accept in it (because i would have them press enter) so please can someone help me with this (if you dont get the question just say so)


Me KS
Joined: Feb 2, 2008

Desire is Reality. Xfire: jetmaster23


Posted: Mar 16, 2008 12:00 PM    Msg. 2 of 5       
Well, there are a lot of "player_action_test_" commands that test if the player has hit a certain key or done a certain action. It would make sense if the "enter" button was the one being tested for:

(player_action_test_accept)
returns true if any player has hit accept since the last call to (player_action_test_reset).

I'm pretty sure this command returns whether or not the player has hit enter. You would just want to use (player_action_test_reset) before doing this so that if they accidentally hit accept before seeing if they want to restart the map, it won't return "true" until they confirm it.

Although, I don't think there's a command to fully reset a map. The closest to that would be "game_revert", which reverts back to the last checkpoint. But, I think you could use "map_name <filename of your map>" in a script to reset your map, even though it's a clumsy way of doing it.


Somone77
Joined: Aug 25, 2007


Posted: Mar 16, 2008 12:04 PM    Msg. 3 of 5       
so if i wanted to have it end i would say do this:

(script startup end
(whatever makes this happen)
(player_action_test_accept)
(player_action_test_reset)
(map_name (map name))
)

or is there something i didnt get in that post?


Me KS
Joined: Feb 2, 2008

Desire is Reality. Xfire: jetmaster23


Posted: Mar 16, 2008 12:12 PM    Msg. 4 of 5       
Quote: --- Original message by: cheater101
so if i wanted to have it end i would say do this:

(script startup end
(whatever makes this happen)
(player_action_test_accept)
(player_action_test_reset)
(map_name (map name))
)

or is there something i didnt get in that post?


"player_action_test_reset" resets all of the tests to false. "player_action_test_accept" returns true or false, so you would want to test for it. More like this:

(script startup end
(whatever leads to this)
(player_action_test_reset)
(sleep_until (= (player_action_test_accept) 1))
(map_name "your map's filename in quotes")
)


Somone77
Joined: Aug 25, 2007


Posted: Mar 16, 2008 04:35 PM    Msg. 5 of 5       
OK thanks me ks you the best!

 

 
Previous Older Thread    Next newer Thread







Time: Sat January 21, 2023 12:56 AM 109 ms.
A Halo Maps Website