LtSpoon06
  • LtSpoon06
  • 51.5% (Neutral)
  • Private Topic Starter
18 years ago
hey. i'm having trouble trying to get one of my maps to work properly. i want it so when a unit from any player enters a given area, a vehicle in the area explodes in a nuclear explosion. is there any way to do this? what scripts would help me?
Sponsor
Sky Demon
18 years ago
I don't think it is possible. Not to my knowledge anyway.
As there are scripts for the AI players but not the human players factions. They are the same but for some reason there isn't a script.

I may be wrong. I do not know everything about scripting...I never really tried what your'e trying to do.
It can be done however releatively easily for the AI players. It might be a bit time consuming though as you would have to do the scripting for all the AI factions.
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
18 years ago
Looking through the scripts available I believe it is possible, but you'll have to check in with an experienced map scripter to confirm it.
UserPostedImage 
Me Myself and Pi
18 years ago
It's not possible (the way you want it) for every player in a multiplayer game, it could only work for the Host or skirmish players. But there's a way that might work for all players, though I've never tried it. I will later when I have more time.
1) Create a new player in the Civilian faction & name it whatever.
2) Place a nuke truck (Civilian\Vehicles\ConvoyTruckArmedWithNuke) in the center of your area & name it.
3) Put a bunch of trees (Note which tree(s) you place.) all around the radius of the truck under the player you just created
4) Create a new script & for the condition, choose, "Player\Destroyed\Player has lost an object of type."
5) In this condition choose the player you created & choose one of you tree types you placed.
6) For any other tree types you placed, copy the condition & place an "Or" between them. In this copied condition, choose another tree type. Do this for any other tree types you placed.
7) For the action, kill the truck.

If this works right, when a player runs over a tree, the truck should explode!
Nicotine
18 years ago
could you set a small object (like a rock) in the area, make it indestructible and set the script so that the rock generates a nuke explosion every so often on a timer? (like a war factory script) It won't be whenever the area is entered, just every so many seconds.

IIRC, there is a nuke explosion in the "system" folder of objects. Having a rock generate this object the way a war factory generates tanks is the concept I'm trying to express.

I'm still in the process of teaching myself how the scripting works, so if I'm way off base here you'll have to forgive me.
UserPostedImage
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
18 years ago
No need for an actual object such as a rock; a single waypoint will do fine...
UserPostedImage 
Me Myself and Pi
18 years ago
Well, I tried it out & it doesn't work. But it does work with civilians. So just do the above steps with civilians instead of trees. When I ran over a guy, BOOM!!!
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
18 years ago
Try it with walls, maybe that would work.
UserPostedImage 
Me Myself and Pi
18 years ago
Maybe, but if a player drops off a vehicle inside the area from a chinook or helix, the nuke wouldn't go off. Besides, it's more funny using civilians!
Sky Demon
18 years ago
Yeah...

At the start of the map you could make a basic intro text that says "Greenpeace rules this area! Do not kill any of the trees!"

Then when you enter the area it will go "WE WARNED YOU!" then nuke goes off!


BOOM!💀😎

LOL, i love the Nuke in Zero-Hour!
SO FUNNY!
Nicotine
18 years ago
wouldn't you end up running over multiple trees before the nuke destroys your tank though? And wouldn't this mean multiple nuke strikes and possibly severe game lag from all the nukes going off at once?
UserPostedImage
Sky Demon
18 years ago
No, not if you only place one nuke explosion on the map.
Or a few tree types that when ran over would triger the explosion.

It would be great if you could assighn a different explosion to each tree but if you got like over 40 trees on your'e map alone it's gonna take a *censored* lot of scripting.