Take weapon -1 reply

  • 1
  • 2

Please wait...

jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#1 6 years ago

Hey,

I rarely need scripting help, but I can't figure it out... The player has only one weapon, the saber. I want to take it, so if he want to change weapon, there shouldn't be 'Lightsaber' in the weapon list (nor anything else). I've tried set SABER1 to 'none', then it gave me an invisible saber. I've tried set WEAPON to WP_NONE and lock weapons; it looks good, but it disabled all my force powers, in addition, I can't lock the weapons, because the player will be able to pick up weapons in the future. I've also tried NODROP under me - didn't work. Any ideas?:rolleyes:




Delta_135

Glitching All Games!

50 XP

19th March 2011

0 Uploads

212 Posts

0 Threads

#2 6 years ago

If i remember right there is a "start with no weapons" flag/check box on the info_player_start that's the only way i know of making the player start without a saber.

As for preventing the player picking up weapons i don't know :clueless:




DarthStevenus

GF is my bext friend *hugs GF*

50 XP

18th December 2009

0 Uploads

909 Posts

0 Threads

#3 6 years ago

There is a console command called g_saberpickuppabledroppedsabers, that allows you to pick up dropped lightsabers (default is 0, no pick up). Perhaps there is a similar command like that for guns. You could make a .cfg file that sets the command at the start of a game.




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#4 6 years ago

Delta_135;5615156If i remember right there is a "start with no weapons" flag/check box on the info_player_start[/QUOTE] Yep, there is, but we should have weapon on the start of the map.

[QUOTE=DarthStevenus;5615166]There is a console command called g_saberpickuppabledroppedsabers, that allows you to pick up dropped lightsabers (default is 0, no pick up). Perhaps there is a similar command like that for guns. You could make a .cfg file that sets the command at the start of a game.

That's true too, I can pick up sabers. But I want to remove the current one, I've browsed the command for taking the saber, but I didn't find anything (moreover, I should take the weapon from ICARUS script, not from menu, so a console command wouldn't fit for this problem).




Raz0r

Worse than most terrible

50 XP

27th September 2006

0 Uploads

6,737 Posts

0 Threads

#5 6 years ago
jk3editor;5615000I've tried set WEAPON to WP_NONE

That's only half the solution. There are the weapons a player is carrying, and there is the weapon the player has selected. Can ICARUS control both?




~*Seto*~

Trapped in the interchet

50 XP

19th October 2007

0 Uploads

334 Posts

0 Threads

#6 6 years ago

Perhaps you can use the spawnflag to start with no weapons and then give the player the weapons you want immediately with target_give or spawning on top of pickups.




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#7 6 years ago

Raz0r;5615320There are the weapons a player is carrying, and there is the weapon the player has selected. Can ICARUS control both?[/QUOTE] Well, ICARUS can set the selected weapon, and can give weapon. But I want to take a weapon:rolleyes:

[QUOTE=~*Seto*~;5615346]Perhaps you can use the spawnflag to start with no weapons and then give the player the weapons you want immediately with target_give or spawning on top of pickups.

Yes, the player starts without weapons, and I give her a saber on the beginning of the map, and later take it.




Delta_135

Glitching All Games!

50 XP

19th March 2011

0 Uploads

212 Posts

0 Threads

#8 6 years ago
jk3editor;5615469 Yes, the player starts without weapons, and I give her a saber on the beginning of the map, and later take it.

well since the original game never had such a event i doubt there is a easy way to do it.

But now that i think about it wouldn't it be possible to make a .npc file that uses the same model as the player and set to not have any weapons and when the player is then supposed to lose there weapons (through a cutscene i presume) just make an ICARUS or something to change the player .npc file




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#9 6 years ago

Well, yes, good idea, just changing the playermodel for example can cause missing shader skin, and moreover that's a little ugly, when we change model, and first it shows the root anim of the new character. Now I don't give him weapon, so problem has gone. By the way good idea, thank you, maybe I'll try to solve it this way :)




Delta_135

Glitching All Games!

50 XP

19th March 2011

0 Uploads

212 Posts

0 Threads

#10 6 years ago

good luck then :)




  • 1
  • 2