Jump to content
Marz1pan

(alive) issue for weapons. Need help in scripting.

Recommended Posts

Hello guys. Have a following problem.

I am making mission for MP. The task is to find a special launcher (Titan, i'm giving him name in editor tit1).

I have also a certain script  if tit1 is not alive. 

But, when i take the spawned launcher in game (I place it in editor on the ground), it appears to be dead after that.  (alive tit1 returns false).

Sorry if it is  a bit difficult to understand.

Is there any way to overcome this? So that tit1 dies only if it is in inventory of a car, that explodes, for example.

Share this post


Link to post
Share on other sites

I guss you need to name the groundweaponholder which holds your weapon because a weapon is no object but that weaponholder is.

 

the problem is the groundweapon holder. a weapon is not an object which can be alive but that weapon holder is.

if u take the launcher from ground then YOU are the new weapon holder and those ground weapon holder despawns and is not alive anymore.

if you lay it down again then a new ground weapon holder spawns to hold that weapon...

 

I found a howto which shows something with the ground weapon holder. might help a bit to understand:

https://steamcommunity.com/sharedfiles/filedetails/?id=248749766

Share this post


Link to post
Share on other sites

As far as i understand, if a place it from the editor, it's already a groundweaponholder.

So when the weapon is taken, holder dissapears and thus returns false on alive. But if you say that a weapon is not an object..

Seems that I'll have to find another way.

Thanks)

 

Bacically what i need -> A Box should be delivered to the trigger. I write the position of the box so that if it's destroyed, one more spawns on that place. The only way i managed to destroy it - put it in ACE cargo of a car and destroy the car. (And this is the only way ti move it fast).

But on dedicated server it doesn't work. After destroying the car {alive box} returns true, but the model itself is nowhere. Maybe there is a way to check whether the Cargo holding the box is destroyed. 

Share this post


Link to post
Share on other sites
13 hours ago, Marz1pan said:

it appears to be dead after that

Well... A rocket launcher is not really a living thing is it?

11 hours ago, Marz1pan said:

After destroying the car {alive box} returns true, but the model itself is nowhere

The model is invisible 100m under the car under the ground, as that's how ACE cargo works.

Share this post


Link to post
Share on other sites

 Perhaps the easier solution is to change the task.  If the Titan launcher is not meant to be fired during the mission-- any stand in intel or prototype document may take its place. An alternate option may be that the special Titan launcher is a Static weapon.  Perhaps this will ease your implementation? 

 

Speaking as a reasonably veteran mission designer, if the technology is holding you back-- think outside the box. It is better to keep producing content than rub your head uselessly against the same problem.  

 

-k 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×