Here's my current script run on level init, you can see it's just a modified tutorial script. :p
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.![:(](../../smileys/frown.gif)
<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.]
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.
![:(](../../smileys/frown.gif)
<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.]