View Full Version : Running Multiple Background Scripts

06-11-2003, 03:23 PM
Just a quick question:

Can more than one script run in the background?

For instance, I know that you can run a deathscript in the background that will fire when the player dies.

Now what I want to have happen is whenever a player cheats and sets force powers above what I originally set in the level start script, I want to either cause a Misson Fail or just reset the force levels.

I have the script already made. Just wondering if I can just use one scriptrunner targeted at the player entity or would I have to use multiple trigger once entities scattered at certain areas in the map to fire the script?

Hopefully this isn't too confusing for most of you...

06-14-2003, 01:45 AM
this was in the ef mod faq.

3. Can you make the NPC's react when the player character draws a weapon?
3. Yes, do a loop that contains a wait (of, say, 500ms) that constantly checks the player's weapon. Something like this:

declare ( STRING, "playerWeap" )
affect ( "Munro", INSERT )
set ( "playerWeap", get( STRING, "SET_WEAPON") )
wait ( 100 )
if ( get( STRING, "playerWeap") = "WP_COMPRESSION_RIFLE" )
run ( "mymap/getangry" )
wait ( 500 )

I'm assuming one of the more advanced scripters here can give you syntax to constanly check for force powers or whatever condition you are looking for.