Jump to content

Sign in to follow this  
guziczek101

Destroy Flak

Recommended Posts

I wrote a script and (if you watch Band of brothers in 2nd period is a scene of destroying of the guns ) i have a problem I'm at work and don't really have time to describe it, but prepared a demo of the problem (do not need anything besides the original OFP) http://www.gamefront.com/files/21024045/test.intro.zip

Share this post


Link to post
Share on other sites
  guziczek101 said:
I wrote a script and (if you watch Band of brothers in 2nd period is a scene of destroying of the guns ) i have a problem I'm at work and don't really have time to describe it, but prepared a demo of the problem (do not need anything besides the original OFP) http://www.gamefront.com/files/21024045/test.intro.zip

Don't see any problem...

Share this post


Link to post
Share on other sites
  guziczek101 said:
the problem is in that the works even if you do not have grenades

Yep, i see.

This works (instead of your checkAA.sqs)

_Flak = _this select 0


@(({_x == "handgrenade"} count magazines player)>=1)

_Flak addaction ["Destroy AA-Gun","stickyBomb.sqs"]


exit

Share this post


Link to post
Share on other sites

Mission Test

I improved this simple script and he add Action if you have two conditions you must be closer than X meters (u can change distance) and u must have at least one grenade in your inventory

Check.sqs

[Target,Distance] exec "Check.sqs"

  Reveal hidden contents

and the stickybomb.sqs isn't mine i found it on Ofpec

stickybomb.sqs

  Reveal hidden contents

Sorry for double post

Edited by guziczek101
xXx

Share this post


Link to post
Share on other sites

hi,

I suggest you to check if _gun is alive in your check.sqs or your loop will run forever even if the gun was destroyed and it's not a good thing for performance.

Your condition should be like this:

? !(alive player) || !(alive _gun): exit

I also suggest to make player play animation PutDown, say "look out!" and group chat "look out!" in your stickybomb.sqs. IMHO it will add to mission atmosphere and show to player that he's putting a bomb.

Add those lines in stickybomb.sqs just after you remove handgrenade:

player playMove "PutDown"
player say "ENG29"
player groupChat "Look out!"

cya.

Nikiller.

Edited by Nikiller

Share this post


Link to post
Share on other sites

Thanks Nikiller I'm a beginner in scripting so I really thank you for identifying bugs

Share this post


Link to post
Share on other sites

I worked a little with this system and I reached the conclusion:

1. does not have to check if player has grenade's/satchels because inventory of player is a little too small (need to have grenades at the expense of ammunition)

2. Tank does not have to be destroyed, enough to be immobilized

3. Crew can die from the overloading of explosion strength even if tank is not destroyed

4. Time is displayed for an explosion (in upper right corner)*

I a little worked on this system and i present this:

Check.sqs

  Reveal hidden contents

Stickybomb.sqs

  Reveal hidden contents

CountD.sqs

  Reveal hidden contents

Demo Mission

* The countdown script is not mine it's from the CSLA 2 mission Poison Island (I hope this is not offended anyone, but really wanted to have the counter to keep the climate,yet it is not what I wanted, watch such as in Call of Duty 2 / Medal of Honor )

Edited by guziczek101
i forgot something

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  

×