
shadowslayer123
Joined: Feb 22, 2009
Not the american average
|
Posted: Jul 8, 2009 09:04 PM
Msg. 1 of 12
i was wondering, how would you make a message appear where it says checkpoint...done when you walk into a certain area. here is an example:
i am trying to make a training map that makes you walk into a certain area and face ai, the message would say:
area1, enemy:2 plasma pistol grunts, difficulty:very easy area2, enemy:3 needler grunts, difficulty:easy
and so on...
also, how would you make it so you cant advance to the next area until you kill the ai in the room you are at(like a temporary invisible wall)
|
|
|

Polamee
Joined: Feb 25, 2008
MP2SPMT's founder
|
Posted: Jul 9, 2009 10:14 AM
Msg. 2 of 12
With scripts of course. The first problem: use HUD messages. http://hce.halomaps.org/index.cfm?fid=4315NOTE: In the tutorial, I neglected to say that the file containing the HUD messages must be saved as filename.hmt, not .txt. As for your invisible wall, I'm not sure if it can be invisible, but you can make use of object_destroy and oject_create_anew to spawn blocking objects/energy shields and such. Or you could use a killbox: Cretae a trigger volume that will kill the player. Name it 'kb'. (global short kb 0) (script continuous kb (if (= kb 0) (begin (sleep_until (volume_test_objects kb (players))15) (unit_kill (unit (list_get (players) 0) ) ) ) (script startup wait (sleep_until (= (ai_living_count [AI ENCOUNTER]) 0) 15) (set kb 1) ) Basically, what this does is activate the killbox until the AI encounter is dead. When its dead, the killbox will not work anymore.
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 9, 2009 10:18 AM
Msg. 3 of 12
Continuous scripts don't play very nicely with sleep_untils. I prefer to use if loops. So! (global boolean isOut false)
(script continuous kill_teh_guy (if (= isOut false) (begin (if (not (volume_test_objects [TRIGGER VOLUME] (players))) (begin (unit_kill (unit (list_get (players) 0))) ) ) ) ) )
(script startup off (sleep_until (= (ai_living_count [AI ENCOUNTER]) 0) 15) (set isOut true) )
Make the Trigger Volume the area that you want the player to stay inside, and the AI encounter the name of the AI encounter you want to have die before the player can leave. Edited by Gamma927 on Jul 9, 2009 at 10:19 AM
|
|
|

shadowslayer123
Joined: Feb 22, 2009
Not the american average
|
Posted: Jul 9, 2009 11:54 AM
Msg. 4 of 12
thank you for your scripts, i am going to change the messages to an sv_say command so can you make a script for me that makes it so when you walk into a trigger volume it says sv_say level 1 grunts and so on
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Jul 9, 2009 11:57 AM
Msg. 5 of 12
Quote: --- Original message by: Polamee NOTE: In the tutorial, I neglected to say that the file containing the HUD messages must be saved as filename.hmt, not .txt.
It can't be just any filename with '.hmt'. It has to be 'hud messages.hmt' It also must be saved as 'Unicode', not 'ANSI'. Anyways, a kill script is a bad idea. The best solution is to use something that the average player can understand. Surely the average player won't understand what is going on when he walks into a completely open pathway and drops dead for no reason. And an invisible wall is a bad idea too. The average player won't get why he can't move past the pathway and will think it's a glitch or something. The best option is just to use a door that opens automatically, like the small ones on b40 or b30. The size of the door should fit your pathway. Have it locked when it initially spawns, and when the encounter is dead, unlock it. It makes the script easier too: (script startup unlock_door (sleep_until (<= (ai_living_count 'encounter name') 0) 1) (device_set_power 'door name' 1) )
|
|
|

shadowslayer123
Joined: Feb 22, 2009
Not the american average
|
Posted: Jul 9, 2009 12:02 PM
Msg. 6 of 12
^good idea, that will make it easyer for players to understand what is going on
anyways, is there a limit to how many trigger volumes can be in one level, if someone makes me a sv_say when walk into trigger volume script, i will use it alot because it will have about 2 ai per room with about 30 or so rooms depending on what actor varients i have to work with Edited by shadowslayer123 on Jul 9, 2009 at 12:03 PM
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 9, 2009 12:04 PM
Msg. 7 of 12
(script startup say (sleep_until (volume_test_objects [TVOL] (players)) 15) (sv_say "[TEXT]") )
No, there isn't a limit to the number of trigger volumes you can have.
|
|
|

shadowslayer123
Joined: Feb 22, 2009
Not the american average
|
Posted: Jul 9, 2009 01:33 PM
Msg. 8 of 12
ok, so i tried it and everything works fine except that the door doesnt open when you kill all the ai. the script compiled succesfully and i got the cache so i know it is not the script. i think i didnt check something in the door, i only checked not initially open or initially shut or something like that. is it the door im using?
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Jul 9, 2009 01:45 PM
Msg. 9 of 12
Make sure the one you checked was 'initially off'. That means that the door spawns locked.
The 'power' of a device is basically whether it's allowed to change position or not, in most cases. 'On' means that it's able to change position, and 'Off' means that it's not. In the case of a door, you can think 'on' and 'off' as unlocked and locked, which is why we want it 'off' initially.
However, this has nothing to do with the position of a device. In the case of most doors, '0' is the position for closed, and '1' is the position for open.
Some doors open automatically when you get close to them if they're unlocked. Those are the ones you should use in this case. If you're using one of the bigger doors that doesn't open by itself, that's probably why the door doesn't open. Those doors need to be opened with a command through scripts.
The doors in 'levels\b40\devices\b40_outerdoor' and 'levels\b30\devices\doors\door small' are the ones you're looking for.
|
|
|

shadowslayer123
Joined: Feb 22, 2009
Not the american average
|
Posted: Jul 9, 2009 01:50 PM
Msg. 10 of 12
will a10's "door cryo chamber" work?
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Jul 9, 2009 05:42 PM
Msg. 11 of 12
Yeah, it opens automatically.
|
|
|

Polamee
Joined: Feb 25, 2008
MP2SPMT's founder
|
Posted: Jul 10, 2009 06:56 AM
Msg. 12 of 12
Quote: --- Original message by: Me KSQuote: --- Original message by: Polamee NOTE: In the tutorial, I neglected to say that the file containing the HUD messages must be saved as filename.hmt, not .txt.
It can't be just any filename with '.hmt'. It has to be 'hud messages.hmt' It also must be saved as 'Unicode', not 'ANSI'. I believed I mentioned that in the tutorial. the .hmt was something I forget to mention.
|
|
|