OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: General Goober on 04 Feb 2003, 09:09:30
-
Need help please to place a map in safe. Have tried command "map moveincargo safe" but it will not work.
-
::) ::)
u meen in da EC safe ?
and wich map r u talkin bout ? ::)
just put it in (using setpos ;D)
LCD OUT
-
LCD, yep the EC safe. It is a map of Nov Island. Could you explain "setpos" instruction for me. I am new to this editor. Could you give me an example please on how to do this? thankyou.
-
da code should b
objectname setpos [getpos safname select 0,getpos safename select 1,getpos safename select 2]
;D
btw i made da scripting of da safe :P ;) ;D
:cheers:
LCD OUT
-
Thanks mate. You did a great job!! I have got it on the fourth floor of one of my apartments on Nogava.
-
Looks like I did not need a script. I found that all that I had to do was just place the item over the safe and it would just be there. The map I thought was just a scroll map turned out to be a map on a large stand. Instead by trial and error I place a folder inside the safe. Only thing is that you cannot pick up objects.
Now can anyone tell me how I can do an objective where one side can remove documents or anything from the safe. The safe provided by this site is awesome and should be able to be put to good use in scenerios.
-
Hey! Thanks Goob! (Easier to type that)
I'm real glad you like our Mod's addon. ;D
Now can anyone tell me how I can do an objective where one side can remove documents or anything from the safe.
Not sure what you mean by this.. Do you want it to be an objective to open the safe?? Or do you want only one side to be able to get in the safe??
Either way, we can help you... Just be a little more specific. ;)
Asmo :beat:
-
Yes, I want to make it an objective for one side to open the safe and retrieve documents. The problem I have is that objects can not be picked up. I remember a scenerio in OFP where a civilian gave the keys to you to for a truck. I do not seem to recall ever seeing the keys, just a message in the "hint" area that you had received them. Maybe something similar in way of script or something.
-
in init.sqs:
player_has_documents = false
safe_open = false
[] exec "document_script.sqs"
document_script.sqs:
action_index = 0
_near_safe = false
#loop
if !(((player distance safe) < 4) && safe_open) then {if (_near_safe) then {_near_safe = false; player removeAction action_index}; goto "skip"}
if (_near_safe = false) then {player addAction ["Get documents","get_documents.sqs"]; action_index = action_index + 1; _near_safe = true}
#skip
~0.5
if !(player_has_documents) then {goto "loop"}
get_documents.sqs:
player removeAction action_index
deleteVehicle documents
player_has_documents = true
hint "You've got the documents!"
You'll have to have some way of detecting the opening of the safe, and when you detect it you'll have to set "safe_open = true"
player_has_documents is the variable you should use to detect if the player has got them or not...
This should work if you can find a way to detect the safe opening, but since it was written on the spot it may have errors and stuff...I'll go over it later when I have more time :)
Good luck with the mission, and good work with the safe guys :)
-
Thats very much I really appreciate your assistance.
-
I recommend an easier method.. (IMO)
Place a trigger that is of any size. (small is good)
In the Condition Field put:
safe animationphase "arm" > 0.7
where safe is the name of your safe. (A little trick LCD taught me for my Beta mission, Malevolent Mtn.) ;)
Then in the on activation field, place:
Hint "Objective completed, you've retrieved the documents!"
Now.. This only works to detect when the safe code is cracked and the safe is opened. ;)
Also, in a short amount of time we will release a "document" addon that will solve all these problems and more very easily! ;D
Asmo
P.S. Thanks Liquid Silence! ;D