hello! I was wondering if it was possible to spawn an ordinance class with the LUA (like at a path node). Basically, I want to create the illusion of an airstrike by spawning a beacon at that path point and subsequently have a hail of fire rain from the sky once the player accomplishes something (in other words, I don't want an airstrike weapon - I want to use the script to trigger this at a specific point). Another possibly use for this is actually creating explosions on the fly via the LUA (by creating an ordinance with no geometry and an explosion, and then killing it immidiately).
It may not be possible, and I'd like to know if it isn't. I'll of course be testing this, but I'd still appriciate any input anyone can provide. Thank you!
Creating ordinance with the LUA
Moderator: Moderators
- jangoisbaddest
- Lieutenant General

- Posts: 661
- Joined: Mon Feb 27, 2006 12:10 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: All Along The Watchtower
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Creating ordinance with the LUA
It's easy to create an explosion whenever you want - kill an object that has an explosion. Having an ordnance is something else, though. I don't think what you want to do can be done as you've written it.
If I were doing this, what I'd do would be to make an effect that looked like your "airstrike," trigger that effect through an explosion, and if you needed damage to come afterward trigger another explosion (or series of explosions) later.
If I were doing this, what I'd do would be to make an effect that looked like your "airstrike," trigger that effect through an explosion, and if you needed damage to come afterward trigger another explosion (or series of explosions) later.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Creating ordinance with the LUA
You could use CreateEntity() to create the beacon.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Creating ordinance with the LUA
A beacon is an ordnance, not an entity. "Spawning" a beacon doesn't even make sense.[RDH]Zerted wrote:You could use CreateEntity() to create the beacon.
- jangoisbaddest
- Lieutenant General

- Posts: 661
- Joined: Mon Feb 27, 2006 12:10 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: All Along The Watchtower
Re: Creating ordinance with the LUA
Ah, ok. I'll look into creating a new effect. Thanks for the tip Mav! Saved me a lot of testing time.Maveritchell wrote:It's easy to create an explosion whenever you want - kill an object that has an explosion. Having an ordnance is something else, though. I don't think what you want to do can be done as you've written it.
If I were doing this, what I'd do would be to make an effect that looked like your "airstrike," trigger that effect through an explosion, and if you needed damage to come afterward trigger another explosion (or series of explosions) later.
I tested that about half an hour ago. It doesn't seem to work (though I admit it might be programmer's error).Maveritchell wrote:A beacon is an ordnance, not an entity. "Spawning" a beacon doesn't even make sense.[RDH]Zerted wrote:You could use CreateEntity() to create the beacon.
