Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Wanting to write a particular script-need help!!!

Page: 1 of 1
 Forceboat
11-19-2004, 6:43 PM
#1
I want to write a particular script to use for a few single player maps, to give my Kyle replacement characters a different weapon. Right now, they load up with the player having a Bryar Pistol. I want to change that by writing a script that has the level start up with a lightsaber. Please! I need help! What are the variables that I need to write for this script so it does this? Please, help!
 razorace
11-20-2004, 1:37 AM
#2
The default setting for maps is to have the player spawn with the lightsaber. All you have to do to revert to that is to remove the icarus stripting that changes a weapon settings on the player.

Refer to the icarus documentation found in the SDK.
 Forceboat
11-20-2004, 3:36 AM
#3
Okay, thanks, I'll try that.
 Forceboat
11-20-2004, 4:47 AM
#4
razorace,

I'm sorry, but I still don't get it. Okay, you said change something in the script so that "Kyle" starts with the saber. Well, it must be an entity thing in the map itself, because it is an addon map I downloaded, and it had no scripts; it starts out with the player having only the Bryar Pistol- hence my wanting to write myself a script so I can change that to him starting with the saber instead. Here's what I wrote in it. Tell me what I missed so that it will work. Here's the text version of it before I converted it to IBI:

//Generated by BehavEd

rem ( "comment" );

affect ( "kyle", /*@AFFECT_TYPE*/ FLUSH )
{
set ( "WEAPON", "WP_SABER" );
}
 razorace
11-20-2004, 8:31 AM
#5
It has to be an ICARUS script. It's not possible any other way according to the source code. My guess is that the file is just in compiled form in the map's .pk3.

Secondly, it should be "player" instead of "kyle".

Finally, you gotta have this new script replace the current scripted used to replace the weapons (which is triggered on player spawn). My guess is that it's going to be in the scripts directory of the pk3 and probably be called something like playerspawn.ibi.
Page: 1 of 1