Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
Help
Search
Login
Register
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
How to make unit target nothing ?
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: How to make unit target nothing ? (Read 1734 times)
0 Members and 1 Guest are viewing this topic.
bdfy85
Contributing Member
How to make unit target nothing ?
«
on:
25 Oct 2005, 02:09:00 »
white frame over the target shows vehicle target ( I'm commander ). Is that possible to remove it and make vehicle taret nothing by script ?
I tried
_gun doTarget objNull,( gunner _gun) doTarget objNull - no luck
Logged
Liberation Mod scripts&balance
Raptorsaurus
Editors Depot Staff
Re:How to make unit target nothing ?
«
Reply #1 on:
25 Oct 2005, 02:28:08 »
Try: tank commandTarget objNull (where tank is the name of the tank). Or if the player is the commander you may be able to use: player commandTarget objNull.
Logged
bdfy85
Contributing Member
Re:How to make unit target nothing ?
«
Reply #2 on:
26 Oct 2005, 01:14:22 »
No, it doesn't work.
Logged
Liberation Mod scripts&balance
Raptorsaurus
Editors Depot Staff
Re:How to make unit target nothing ?
«
Reply #3 on:
26 Oct 2005, 02:21:14 »
OK, I did some testing and this worked for me. Make a game logic:
_gl = "logic" createVehicle [0,0,0]
Then have your commander (player) target the game logic, then delete the game logic
player commandTarget _gl
~ .01
deleteVehicle _gl
Logged
bdfy85
Contributing Member
Re:How to make unit target nothing ?
«
Reply #4 on:
26 Oct 2005, 02:45:01 »
No it doesn't help(only target box appears for a moment ). I can still see the frame over target.
Let me explain my problem :
I've almost finished movable 45mm gun for LIBMOD
http://www.flashpoint.ru/forum/showthread.php?goto=newpost&t=35198
but I encounter serious trouble
I have to remove weapons\magazines from the gun in order to prevent it firing while moving. But if gun is targeting smth and you try to remove its weapon - the game will crash
That's why I'm looking for a solution to set null target.
Any suggestions ?
Logged
Liberation Mod scripts&balance
Raptorsaurus
Editors Depot Staff
Re:How to make unit target nothing ?
«
Reply #5 on:
26 Oct 2005, 20:23:22 »
How about what I said with the game logic, but do not delete the game logic, instead just make the game logic out of range of the gun so it will not fire at it? At this point I must say I am grasping at straws, but what else is there?
Logged
bdfy85
Contributing Member
Re:How to make unit target nothing ?
«
Reply #6 on:
27 Oct 2005, 02:13:25 »
I guess, It's an OFP bug...
Try put Jeep with MG on the map, be a driver. Then try to target something (ex. tank nearby ) and then try Removeallweapons command, The game crashes
I wonder how to prevent this.
OFP 1.96
Logged
Liberation Mod scripts&balance
Raptorsaurus
Editors Depot Staff
Re:How to make unit target nothing ?
«
Reply #7 on:
27 Oct 2005, 22:57:51 »
How about if instead of making it target nothing, instead just set its combatMode to "green" or "blue (_unit setCombatMode "blue")? That would keep it from firing. You could make a script that would change the combat mode to "blue" for "green" as soon as it begins to move.
Logged
bdfy85
Contributing Member
Re:How to make unit target nothing ?
«
Reply #8 on:
29 Oct 2005, 00:22:23 »
Solved. I have to removw weapons , but one by one - not with RemoveAllWeapons.
anyway there's game bug. Look at the demo mission : launch it, then command gunner to target tank ahead ,then press 0-0-1 or 0-0-2. Game crashes.
Logged
Liberation Mod scripts&balance
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
How to make unit target nothing ?
Top of page