Jump to content
Sign in to follow this  
Ace3

IS THIS POSSIBLE TO SCRIPT???

Recommended Posts

We desperatelly need some help scripting our mission. We are preparing a CTF mission for the 2nd Spanish OFP league and we need to implement 3 vital things for the map we don't even know they are possible to do. The 3 things are the following:

1) When somebody steals a flag, we want to set a 5 min. limit to score. If the flag carrier team does not score within that limit, the flag will be automatically restored to the post. Is this possible to script. How??

2)We have included 1 civilian in the map. This civilian will be the game referee. He will be located in a bunker on a hill, from where he will be taking snapshots of the action, making sure everything goes ok. We want this civilian to be undestructible. Is this possible. How?

3)Each team will have an engineer in their lines. We want this engineer to be able to build trenches (sand bags, etc) and ammo. crates wherever he wants. Is this possible to script? How??

The map is almost ready. We just need those "simple" scripts in order to get going. Any help will be MUCH apreciated.

Thanks so much in advance!!!

Share this post


Link to post
Share on other sites

2) I've got some ideas, but there not fool proof. If he is AI, make a trigger, switch, in the condtion field type:

!(alive unitname)

and in the activation field type:

unitname setdammage -1

Make sure the trigger is set to repeat.

NB: THIS WILL NOT WORK ON A PLAYER, as soon as the player dies, the death cutscene activates. And it will also detect the death of the AI man. But he will comeback to life everytime he is killed.

You can also try the Getdammage unitname < .99 command, but if he takes a fatal hit he may die.

Share this post


Link to post
Share on other sites

But if you read the post again, he said that he wanted to script that to a player, so that won't work.

Share this post


Link to post
Share on other sites

1. set a trigger to be activated when the flag is stolen, make it countdown 5 mins. OnDeactivation, run the script that set the flag on the pole. Maybe you have to remove the flag from the player too.

2. Not indestructable. What Intruder said is about as close as you can get to it, but he can still die. CTF right? Then you know how to script a respawn.

3. addAction, execute scripts that allow you to do these. There is a sample script for building those trenches at the opf editing centre. Maybe you have it. It should give you the answers you need here.

I don't know if this will work. Just suggestions.

Share this post


Link to post
Share on other sites

Isn't their a command called "allowdammage"confused.gif

Referee allowdammage False

or does it only work for vehicles?

also.. for your engineer... in the init field try adding stuff like this:

this addaction ["Drop Ammo Box","makeammo.sqs"]

and then make a script called "makeammo.sqs" like:

"reammoboxwest" createunit [getpos engineername,groupname]

exit

(although maybe createvehicle or camcreate works instead of createunit.. but this is just to provide an example)

then this engineer you can order to build stuff by having the commander select the engineer, then select "6: Action" and then select "Drop Ammo Box". OR if you walk next to him, the action will appear in YOUR action menu list and then go away when you walk away from him.

Personally I like the idea of having a guy build M2 guns or placing those tank stopping fences. It's a good idea Ace3! I might use this! Maybe even make an engineer playable with those actions added in.. so a player can walk around "building stuff"!

Share this post


Link to post
Share on other sites

Yeah, kinda like tribes.

The allowdammage command only works on objects.

It also says in the comref that this command is obsolete.

Share this post


Link to post
Share on other sites

Thanks guys for the help. That feedback gave us a couple ideas that could help us.

Whenever we finish the map and start the league (after the holidays) I will share the map with you. Personally I think it is one of the best CTF maps I ever played.

Just wait and see...

Have a merry Xmas all of you!

Share this post


Link to post
Share on other sites

Allowdammage was made obsolete after the first patch, used to give you invulnerable units (ie. they could survive a nuclear explosion at ground zero and still be smiling).

A d*amned good idea getting rid of that one, if you ask me.

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  

×