Jump to content
Sign in to follow this  
Carpaazi

Trigger that adds action and gives a pipebomb ?

Recommended Posts

well damn...the simpler the problem, the harder it is to see...huoh, thx =)

---------- Post added at 12:37 PM ---------- Previous post was at 12:35 PM ----------

Works like a charm,thank you

Share this post


Link to post
Share on other sites
Can you limit the number of explosives IN the trashcan, or PER player FROM the trashcan?

See the edit I made to my previous post.

Share this post


Link to post
Share on other sites

I imagine that putting "explosivesRemaining = 3" in the init could cause problems with JIP.

So that people who join later will reset the counter to 3.

@Tajin, what's the nature of addAction (in terms of script locality) in MP? I haven't tested recently but my guess is scripts are local to the player who "used" the action (or the server if AI used it).

Yup actions only get executed locally, for the person who activated it. If AI does it, it depends on where that AI is local. AI from your squad are local to your pc aswell.

Using an vehiclevar for "explosivesRemaining" would also make sense, so multiple trashcans could be placed if needed.

Share this post


Link to post
Share on other sites

That might be true.

if(isNil "explosivesRemaining")then{exposlivesRemaining = 3}

That could work, since (and I read this somewhere) publicVariable should set it for JIP players.

Using an vehiclevar for "explosivesRemaining" would also make sense, so multiple trashcans could be placed if needed.

Lol, good scripting mindset, always thinking about a universal implementation.

Share this post


Link to post
Share on other sites

if(isNil "explosivesRemaining")then{exposlivesRemaining = 3}

Yeah, I think that would do the job.

Lol, good scripting mindset, always thinking about a universal implementation.

It's an habit. :rolleyes: An habit that comes from sheer laziness. ;)

Share this post


Link to post
Share on other sites

Where would this line of code go?

if(isNil "explosivesRemaining")then{exposlivesRemaining = 3}

in the explosives.sqf?

Share this post


Link to post
Share on other sites

aah i see,ok

---------- Post added at 03:38 PM ---------- Previous post was at 03:27 PM ----------

when i replace the 'exposlivesRemaining = 3' in the init of trashcan with

if(isNil "explosivesRemaining")then{exposlivesRemaining = 3}

It won't give me any action anymore

Share this post


Link to post
Share on other sites

maybe you should try to write it correctly ;)

Share this post


Link to post
Share on other sites

Oops... I have a very shitty keyboard here at work... sometimes it makes me dyslexic.

if(isNil "explosivesRemaining")then{explosivesRemaining = 3}

(exposlives... lol)

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
Sign in to follow this  

×