Hitro
Member-
Content Count
5 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout Hitro
-
Rank
Rookie
-
I have a problem while trying to do the following: A group of paratroopers is moved into the cargo of a plane (not a helicopter!). The plane then circles somewhere until it gets the order to move to the drop zone. Now this drop zone should be variable, particularly one of four points marked with a game logic object (also tried it with an invisible H). In the script I therefore tell the plane to move to the selected point's location (like "plane move getpos dropzone"). Alternatively I tried this with the domove command, both with the plane's group as well as the plane itself. Nothing worked. It works fine with all other kinds of units, be it cars, people or also helicopters. But it doesn't work with planes, apparently. So do I have to do something else with a plane? Or is this not possible at all? A search didn't give any useful information on this, so I'd very much appriciate any help.
-
Question on the "vehicle" command
Hitro replied to Hitro's topic in OFP : MISSION EDITING & SCRIPTING
Yeah, that works, I just tried that myself. I guess it is a problem with variable scope, I'll try to find a way to work around that in the script. Thanks. -
Question on the "vehicle" command
Hitro replied to Hitro's topic in OFP : MISSION EDITING & SCRIPTING
Well, that is pretty much the problem, but it's not the script that does it. For some reason the variable is always the players current vehicle, not the one he performed the action on. What exactly have you tried? -
I have the following problem with the "vehicle" command: I want to give the player the option to perform an action in any vehicle. Which action that is is not the point, I'm trying to figure this out in general, let's say for the sake of argument that the player should be enabled to build a carbomb in any given vehicle. To do this I wrote a little script that triggers if the player mounts a vehicle. Then I add the action to the vehicle and also remove it as soon as the player leaves the vehicle. It is also removed if he performs the action, in that case I add another action (in this case detonating the just built bomb) to the vehicle. If the player doesn't perform it before leaving the vehicle (which would be smart in the bomb case) it is removed and added to the player himself. In both cases, inside and outside the vehicle, the action triggers the same script (in the case the explosion). Now the action is to be performed on the vehicle (for example it should explode), which is done by triggering an explosion script I've written in the following way: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[chosenVehicle] exec "explosion.sqs" The variable "chosenVehicle" should contain the vehicle the action was performed in, and here is the problem. In the script that creates the bomb (or any other action) it is assigned the following way: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">chosenVehicle = vehicle player Unfortunately OFP seems not to store the specific vehicle at that point but instead the general variable "vehicle player", i.e. the vehicle the player is in at the moment he triggers the bomb, which could be none and therefore himself. So the question is how can I define that explicitly? I have tried to use a local variable as a buffer, like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_currentVehicle = vehicle player chosenVehicle = _currentVehicle but that makes no difference. Any help would be appreciated.
-
When units communicate over the radio they only refer to each other by their numbers (1 to 12) which is also displayed on screen. But to increase the atmosphere in a mission or campaign I would find it useful if their actual name would be displayed as well (as it is done with human players). Is that possible to be edited anywhere?