lemondragon
Member-
Content Count
9 -
Joined
-
Last visited
-
Medals
Everything posted by lemondragon
-
Hey there everyone, I encountered a problem while scripting. I want the command "nearestObject" to return the nearest car, armored vehicle or helicopter, and then move my "hostage" in to the cargo of that vehicle. I'm using the following code: _carobject = nearestObject [player, "Car"]; _armobject = nearestObject [player, "Armored"]; _airobject = nearestObject [player, "Air"]; if(((_target distance _carobject) < 10)) then { _target moveInCargo _carobject; }; //same 'if' statement for the other 2 var's. This code, unfortunately, does not work. I personally think it has something to do with the classnames (Car, Armored and Air). Is someone able to help me out?
-
nearestObject of any vehicle.
lemondragon replied to lemondragon's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm stuck again, I'm trying to update the nearest vehicle every time/second, so I can let a 'addaction' pop up (which the player can use to put the hostage in the vehicle) whenever the player is near a vehicle. I tried to put everything in a WHILE loop, tried partly moving bits of code around, etc, etc. well I tried a lot, I've cracked my brain on it the last ~2 hours, but I can't figure it out. Edit: Again, After much effort I managed to get it working. Thanks for all the help Das Attorney :D -
nearestObject of any vehicle.
lemondragon replied to lemondragon's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It works for the car, so I guess the "Armored" and "Air" class name are wrong. I tried finding the actual class names in the config browser, but I didn't get any wiser. Edit: I replaced the three class names with "All", it delivers the wished result since the script already checks if the vehicle has a cargo slot. Thanks a lot for the help :D -
Hey there everyone. I have this problem: I am using _target enableSimulation false to freeze players (in multiplayer), the user freezing the other players sees the other person frozen, but the frozen person can just walk around. I figured out the problem: "This command only works locally and must be run on all machines to have global affect.". The problem is, I can't find out how to use it correctly, so it's running globally. Any help is appreciated ;)
-
Global 'enableSimulation'
lemondragon replied to lemondragon's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks everyone. it works perfectly! -
Global 'enableSimulation'
lemondragon replied to lemondragon's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I was about use that command, when I saw a post on the forums saying that it is discouraged to use that command. @sxp2high Thanks a lot , I will test this out tomorrow! -
Config for static object
lemondragon replied to lemondragon's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
The model still isn't visible in game, and the game still gives the same error as before (cannot load texture core\textures\texture01.paa). I changed the name of the texture, just like you said, to texture01_co.paa. But the path of the texture was already set to my desktop folder, where it is located in. But still no visible bottle. Edit: to clarify, the path in Oxygen 2 to my textures is as following: C:\users\%username%\desktop\drink_dest\texture01_co.paa %username% = my name. -
Hey there everyone, I'm currently trying to get into scripting. Since I have some programming knowledge scripting isn't the hard part: the configs are. Currently I'm trying to make a script where you have to drink once in a while in order to survive. The script is decent, so the next step was to import a bottle in order to drink. I've got the following: - a .p3d file of a bottle - a .paa of the texture - a Config.cpp (that probably isn't working) My Config.cpp: class CfgVehicles { class Static; class bottle : Static { scope = public; model = "\drink_dest\drink_bottle.p3d"; displayName = "4SFG_Bottle"; faction = "Empty"; vehicleClass = "Small_items"; }; }; When packing the files with BinPBO I get no errors, but I can't seem to find the bottle in the editor. All help is appreciated.
-
Config for static object
lemondragon replied to lemondragon's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Thanks a lot! I can place the bottle in the editor now, but I can't see them in game. I got the following errors: - no entry config.bin/cfgfactionclasses.empty I removed faction = "Empty"; to fix this problem - cannot load texture core\textures\texture01.paa I have no idea how to fix this problem. the texture is in the same folder as the config and .p3d file while packing the PBO.