Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsJedi Outcast and Jedi Academy Editing Forum → Scripting: No lightsaber
Scripting: No lightsaber
2004-10-11, 9:09 AM #1
Here's my current script run on level init, you can see it's just a modified tutorial script. :p

Code:
rem ( "script run at start of level" ); 
rem ( "set up force powers and weapons" ); 

affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) 
{ 
// Neutral Force 
                set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_FORCE_PUSH_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_FORCE_PULL_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_FORCE_SEEING_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
	set ( /*@SET_TYPES*/ "SET_FORCE_SIGHT_LEVEL", /*@FORCE_LEVELS*/ "0" );
// Light Force 
                set ( /*@SET_TYPES*/ "SET_FORCE_ABSORB_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_FORCE_HEAL_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_FORCE_PROTECT_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_FORCE_MINDTRICK_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
// Dark Force 
                set ( /*@SET_TYPES*/ "SET_FORCE_GRIP_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_FORCE_DRAIN_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_FORCE_LIGHTNING_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_FORCE_RAGE_LEVEL", /*@FORCE_LEVELS*/ "0" ); 
// Saber Abilities 
                set ( /*@SET_TYPES*/ "SET_SABER_THROW", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_SABER_DEFENSE", /*@FORCE_LEVELS*/ "0" ); 
                set ( /*@SET_TYPES*/ "SET_SABER_OFFENSE", /*@FORCE_LEVELS*/ "0" ); 

	set ( /*@SET_TYPES*/ "SET_ARMOR", 100 );
//	set ( /*@SET_TYPES*/ "SET_SKIN", "models/players/stormtrooper/model_default.skin" );
//	set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_STUN_BATON" );
//	set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "Drop" );
	set ( /*@SET_TYPES*/ "SET_SABER1", "none" );
	set ( /*@SET_TYPES*/ "SET_SABER2", "none" );
	set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_SABER" );
	set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "drop" );
	set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_BLASTER" );
	set ( /*@SET_TYPES*/ "SET_LOCK_PLAYER_WEAPONS", /*@WEAPON_NAMES*/ "true" );
	set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_MELEE" );
	set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_BLASTER_PISTOL" );
}


The SET_SKIN line is commented out because it doesn't work (Part of my problem). The model that the player ends up with is not a stormtrooper, but I can't tell what it is because it's textured with the default texture...

The STUN_BATON line was from a different project, I commented it out for this one and put in MELEE instead.

The DROP command doesn't seem to work on the saber... the player still has it when the level starts.

I know the DFMod team has done it, so I know it's possible.

The "SET_LOCK_PLATER_WEAPONS" is there because there is no other way I can think of from keeping the player from using the lightsaber... as soon as I can figure it out I'll remove it. :(

<PICARD>Suggestions?</PICARD>

[Edit: Also, is there a way to have scripts use console commands? If so, I could do playermodel stormtrooper as well as possibly get rid of the lightsaber.]

2004-10-12, 3:39 AM #2
Hmm. I'll check this out.

Prehaps look at example scripts from the game? Like the mission where you lose the lightsaber and forced to use guns in that imperial level?
SnailIracing:n(500tpostshpereline)pants
-----------------------------@%
2004-10-13, 2:02 AM #3
first use a weapon_none line...Then add the weapons you want him to have
2004-10-14, 1:26 AM #4
Have you checked out the SET_PLAYERMODEL command that makes use of NPC files? I think using the stormtrooper's NPC files would probably work.
The cake is a lie... THE CAKE IS A LIE!!!!!

↑ Up to the top!