Jump to content

Home

SP Icarus Scripting Questions


neal8929

Recommended Posts

I want to make a script that when i load my level in SP when i spawn, i have certain weapons. I know this is done with scripting, i have behaved and i think i have it set up right.

 

but could someone tell me how to, in detail, make a script that determins weapons and this script executes when i start my level. mabey i have my folders mest up, or mabey im not doing something right in GTK, or mabey my script is just messed up, I DONT KNOW! I know this has been addressed in other posts, but it didnt work for me :(

 

TIA

Link to comment
Share on other sites

Target the info_playerstart to a target_scriptrunner. The scriptrunner should have the key "usescript" and value "[levelname]/[spawnscript_name]" That assumes you place your scripts in a subfolder named after your map in the scripts folder. That's always a good idea to keep things tidy and orderly.

 

There are some complications to the weaponry setting, so also have a look at the info_playerstart for the flags available there. For example if you want to start with only a blaster rifle, you can check the noweapons flag, and then just give the blaster in the spawnscript.

 

The script itself is simple. Just affect "player" and place the set_weapon commands under the affect.

 

MIA

Link to comment
Share on other sites

I must be retarted cause im still having trouble... take a look at my script, that may be prob

 

 

also whats the point of the spawnscript_name? why isnt it just name?

 

 

 

 

rem ( "sets weapons" );

 

affect ( "player", /*@AFFECT_TYPE*/ FLUSH )

{

set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_SABER" );

set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_CONCUSSION" );

set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_BLASTER" );

}

Link to comment
Share on other sites

That script looks ok to me. Your problem is probably elsewhere. Check the console to see if the game can't find the script. And recheck the entities and targeting.

 

And I don't really care what you name your scripts. You can name them after your neighbour's dead cats, for all I care. That was just an example. Just be sure not to include spaces in the names. Thus, use the underscore_.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...