Jump to content

Starting player with no lightsaber and no force powers


Recommended Posts

So I've been searching for how to do this all day.  I found a few people asking the same thing, but all threads seem to end unsatisfactorily.  

 

The main suggestion given every time is a simple behavED script that sets the player's weapons to none, then gives them the desired weapon.

 

The script compiles fine.  The problem is it never works in game.  I have tried it with a target_scriptrunner with the info_player_start.  I have also tried setting a spawnsript in the info_player_start itself.  I have seen some people suggest that it is actually impossible to have scripts affect the info_player_start.

 

Does anyone have a definitive answer on this?  I'm trying to create a map where you play as a simple pirate, who is not a jedi.

Link to comment

To do this myself, I had the info_player_start targetting a target_scriptrunner which ran "intro.ibi"

At the end of the intro script, I put a command to use a target_scriptrunner with a targetname of "forcepowers"

cS5WPH7.png

My "forcepowers.ibi" was just a list of what Force powers I wanted the player to have and at what level. At the bottom is also a command to specify a lack of weapon. You could change that to a blaster or such if you preferred, of course.

3uqzs1z.png

I hope this visualisation helps. 😃

Flashfearless likes this
Link to comment

Alright!

I have made some progress.  My first problem was that I had the script written with affect set to info_player_start.  I changed it to "player" and set an NPC_Targetname on the info_player_start as "player" and now the script runs.

 

However, it isn't taking away the lightsaber.  It is giving me the weapon I selected, but the lightsaber is still in my inventory.  

 

This is my incredibly simple script:

affect ( "player", /*@AFFECT_TYPE*/ FLUSH )
{
    set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_NONE" );
    set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_BOWCASTER" );
}

 

I know about the stun_baton spawnflag/spawnflag 32.  I know! But I want my script to work properly. 

 

 

Link to comment

Popped open my map to see if I'd left anything out! I noticed you mentioned the stun_baton flag. Do you not have the "noweapon" option shown here? Spawnflags 64. 😀

When I don't tick it, I get given a lightsaber in addition to whatever I dictate my script. 


AxhOopk.png

After ticking it, all worked fine. I added the melee weapon in addition to the bowcaster in this example.

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...