IPB


Welcome Guest ( Log In | Register )

 Forum Rules Forum Rules
 
Reply to this topicStart new topic
> Disarming Units, in MP again
SaS TrooP
post May 12 2009, 20:43
Post #1


N00b always & everywhere
****

Group: Members
Posts: 430
Joined: 30-October 07
From: Wodzisław Śl. - Poland
Member No.: 1,589



So, when player respawns (after 20 seconds) I want his weapons removed. I tried f*ckin' simple:

CODE
_unit = this select 1
~21
removeallweapons _unit

ExIT


f*ckoff.gif

THere couldnt be easier option but it simply... does not work tongue.gif

Have anyone idea how to remove players weapons after spawn?
 
Quote Post
Rellikki
post May 12 2009, 21:03
Post #2



Group Icon

Group: Addon Maker
Posts: 1,148
Joined: 4-November 06
Member No.: 13



Make a trigger activated repeadetly with condition:
alive unit_name
Put the 20 seconds in the time fields and on the activation field type:
removeAllWeapons unit_name
Simple as that. It will activate every time the unit respawns, after the specified time.

This will get activated every time though, even at the start of the mission after the timer. If you only want it to take effect after one death, put something else in the condition field too, for example:
unit_dead && alive unit_name
Then make another trigger with condition:
!alive unit_name
And on the activation field type:
unit_dead = true
That should make the weapon removal trigger take effect after one death, in case you want it that way.

You will need to make those triggers for every each one of the units, in case you want it to happen for several ones.

This post has been edited by Rellikki: May 12 2009, 21:04
 
Quote Post
SaS TrooP
post May 13 2009, 16:38
Post #3


N00b always & everywhere
****

Group: Members
Posts: 430
Joined: 30-October 07
From: Wodzisław Śl. - Poland
Member No.: 1,589



OK, but Do I have to put 16 triggers for BLUEFOR and 16 for OPFOR, because this is number of players or just one. But from your post it seems there is no multi use array.
 
Quote Post
Rellikki
post May 13 2009, 18:11
Post #4



Group Icon

Group: Addon Maker
Posts: 1,148
Joined: 4-November 06
Member No.: 13



You could try changing the unit_name to player, because that value is local, so I'd suppose it could be made to happen with just one trigger for each player. If it doesn't work, then you might need to make 16 triggers, yes. I've looked at some deathmatch missions and that's how they did the rearming on them...
 
Quote Post
Supr3me KiLL3r
post May 13 2009, 18:41
Post #5


Member
***

Group: Members
Posts: 124
Joined: 22-June 08
Member No.: 3,465



The answer may be simpler than any of you think....

First object starts with zero

CODE
_unit = this select 0


--------------------
My Armed Assault Youtube page.
http://www.youtube.com/watch?v=sYwE-HkeYuQ
 
Quote Post
Rellikki
post May 13 2009, 18:56
Post #6



Group Icon

Group: Addon Maker
Posts: 1,148
Joined: 4-November 06
Member No.: 13



Hmm, too true, didn't have a look at SaS TrooP's script to begin with... tongue.gif Also, you need to add an underline in front of the this select 0, like this:

CODE
_unit = _this select 0
 
Quote Post

Fast ReplyReply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 23rd April 2024 - 21:42