Jump to content

Home

Running Multiple Background Scripts


Obsidian-Jovani

Recommended Posts

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...

Link to comment
Share on other sites

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" )

loop(-1)

{

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...