Laser ODF (cis_weap_deployer_ord)
Lasers Deploying Turrets
Moderator: Moderators
- Lagomorphia
- Major

- Posts: 502
- Joined: Sun Dec 13, 2009 10:02 am
Lasers Deploying Turrets
I've been trying to get deployables (in this case an autoturret) to spawn very high up and drop down. The only way I've found to offset the location something spawns when a unit uses it is to deploy it from an orbital strike. The orbital strike beacon, however, will not spawn a deployable, but it will spawn a bolt. I know you can spawn units from launching a recon droid using LUA coding. Is it possible to LUA code so that when the laser below spawns an autoturret spawns with it? Also, will the autoturret then fall to the ground as normal?
Laser ODF (cis_weap_deployer_ord)
Laser ODF (cis_weap_deployer_ord)
Hidden/Spoiler:
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Lasers Deploying Turrets
no, you wont be able to do that, atleast not directly. the reason why you can spawn units when an autoturret is deployed is that you can check whether a dispenserweapon and only a dispenserweapon was used via lua.
you could however probably offset the matrix of the autoturret when its deployed so its higher up, but im not sure, i never did anything with matrixes.
you could however probably offset the matrix of the autoturret when its deployed so its higher up, but im not sure, i never did anything with matrixes.
- Lagomorphia
- Major

- Posts: 502
- Joined: Sun Dec 13, 2009 10:02 am
Re: Lasers Deploying Turrets
Trying to make an air drop, so I need the turret to spawn convincingly high and then fall down.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Lasers Deploying Turrets
It's perfectly possible to teleport the turret to a higher matrix directly after it's spawned. I'm not sure if it would fall down though; do turrets follow unit/vehicle "physics"?
You'd run into trouble when trying to use it indoors or under a protrusion, also.
You'd run into trouble when trying to use it indoors or under a protrusion, also.
- Lagomorphia
- Major

- Posts: 502
- Joined: Sun Dec 13, 2009 10:02 am
Re: Lasers Deploying Turrets
You keep talking about this matrix thing and I have no idea what it is. 
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Lasers Deploying Turrets
yeah, too bad
Hidden/Spoiler:
- Lagomorphia
- Major

- Posts: 502
- Joined: Sun Dec 13, 2009 10:02 am
Re: Lasers Deploying Turrets
If it involves ZeroEditor I won't be able to use it here.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Lasers Deploying Turrets
It's a LUA thing. You won't need ZE.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Lasers Deploying Turrets
my guess would be that:
i used firefangs disguisekit-code as base
Code: Select all
Turret = "change_ord"
Dropturret = = OnCharacterDispenseControllable(
function(player,controllable)
if GetEntityClass(controllable) == GetEntityClassPtr(Turret) then
SetEntityMatrix(controllable, CreateMatrix(0.0, 0.0, 0.0, 0.0, 100.0, 0.0, 0.0, GetEntityMatrix(controllable))) --teleports the turret 100 metres in the air
end
end
)
- Lagomorphia
- Major

- Posts: 502
- Joined: Sun Dec 13, 2009 10:02 am
Re: Lasers Deploying Turrets
I'll try that out shortly and report back on what happens.
- Dakota
- Field Commander

- Posts: 991
- Joined: Mon Dec 06, 2010 8:21 pm
- Projects :: making random weapon assets
- xbox live or psn: PS3 beats xbox
- Location: at a computer desk floating around in space
Re: Lasers Deploying Turrets
hmm i would think that just changing the ordanance would to the autoturret itself would make it work, i haven't tryed it with auto turrets but i have with rockets and various other bullets.
- Lagomorphia
- Major

- Posts: 502
- Joined: Sun Dec 13, 2009 10:02 am
Re: Lasers Deploying Turrets
Not sure I understand.
- Dakota
- Field Commander

- Posts: 991
- Joined: Mon Dec 06, 2010 8:21 pm
- Projects :: making random weapon assets
- xbox live or psn: PS3 beats xbox
- Location: at a computer desk floating around in space
Re: Lasers Deploying Turrets
well i just copy the auto turret.odf and then i go to the ordanence of the orbital then i delete all of that and then paste the auto turret odf words in its place. i always keep a back up of both files in case of problems.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Lasers Deploying Turrets
the problem is that entitys such as turrets, mines etc. can only be deployed with dispensers, if you could do that with any weapon, it would defeat the purpose of dispensers, right?
- Dakota
- Field Commander

- Posts: 991
- Joined: Mon Dec 06, 2010 8:21 pm
- Projects :: making random weapon assets
- xbox live or psn: PS3 beats xbox
- Location: at a computer desk floating around in space
Re: Lasers Deploying Turrets
i wonder if we could set the orbital strike odf up to be a dispenser... i'll have to test that later.
- Lagomorphia
- Major

- Posts: 502
- Joined: Sun Dec 13, 2009 10:02 am
Re: Lasers Deploying Turrets
Already tried setting the beacon ordnance as a dispenser, and it failed.
- [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: Lasers Deploying Turrets
1) You need the player to use a weapon or do an action that triggers a Lua event callback. It doesn't matter if it's a deployable event, an object destruction of a recon droid, or something else. Use whatever fits your map best.
2.1) If that weapon dispenses a turret, teleport it into the sky. Units fall when teleported into the air so I would assume the turret falls as well.
2.2) If that weapon or action doesn't dispense a turret, use CreateEntity() to make one at a matrix offset into the sky. You could offset from the character's position (matrix), from the recon droid's last position, or whatever.
Did that help?
(This is how to do it through Lua, I would't know how/if it could be done though an OFD change)
2.1) If that weapon dispenses a turret, teleport it into the sky. Units fall when teleported into the air so I would assume the turret falls as well.
2.2) If that weapon or action doesn't dispense a turret, use CreateEntity() to make one at a matrix offset into the sky. You could offset from the character's position (matrix), from the recon droid's last position, or whatever.
Did that help?
(This is how to do it through Lua, I would't know how/if it could be done though an OFD change)
-
CalvaryCptMike
- Captain

- Posts: 476
- Joined: Sat Feb 19, 2011 3:10 pm
- Projects :: Nothing--absolutely nothing
- Location: Freed by alien robots, now living on Mars
- Contact:
Re: Lasers Deploying Turrets
Couldn't you just make the ThrowStrength really strong and then add the ShotElevate to 90 degrees(straight up)?
Wouldn't that make it fly up and then fall down like you wanted?
- Dakota
- Field Commander

- Posts: 991
- Joined: Mon Dec 06, 2010 8:21 pm
- Projects :: making random weapon assets
- xbox live or psn: PS3 beats xbox
- Location: at a computer desk floating around in space
Re: Lasers Deploying Turrets
hmm out of all of us we were thinking something more complicated... but...CalvaryCptMike wrote:Couldn't you just make the ThrowStrength really strong and then add the ShotElevate to 90 degrees(straight up)?Wouldn't that make it fly up and then fall down like you wanted?
THAT IS PERFECT!!!
:themoreyouknow:
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: Lasers Deploying Turrets
ThrowStrength does not exist, but there are Range and Velocity.CalvaryCptMike wrote:Couldn't you just make the ThrowStrength really strong...
