Jump to content
Sign in to follow this  
YouKnowBlom

[HELP!] stealing the intel.

Recommended Posts

Hello!

I need help with a script. i dont know exactly how to describe this soo im just going to tell you a little about the mission where the script is going to be used. you and a squad of 3 are going to enter a quite big city and find the intel (bag/computer with info). when the player finds it i want it to have a loading time, sort of like you're hacking it.

that should give you an idea about what the script is going to be.

ps. im new to scripting and arma 3 mission editing :P first post on here too! :D

Share this post


Link to post
Share on other sites

Maybe put this addAction["Hack computer","hack.sqf"] to the computer which triggers script that has something like

hint "1%";

sleep 0.5;

hint "2%";

sleep 0.5;

hint "3%"

...

hint "100% , hack complete!";

though i don't know if new hint replaces the old one that fast,i'm new to this too. :)

Share this post


Link to post
Share on other sites

It is unclear if you want to script a random location for the intel, if so you will need to generate a random position in the town and deal with placing the object in a building so that its not in a wall, under the floor, etc.

Regarding a script to interact with it, I will assume that you already placed the object in the editor. In the object's init field, write something like this:

this addAction ["Steal Intel", {(_this select 0) removeAction (_this select 2); (_this select 1) switchMove "AmovPknlMstpSlowWrflDnon_relax"; sleep 30; (_this select 1) switchMove "";}];

When a player uses this action, the action will be removed and the player will kneel down for 30 seconds, then stand back up. The player can still slide around a little even though no animation is played and look around also. I am not sure if you want to complete a task or have something happen in the mission when the intel is stolen, so I did not include anything like that.

K120's suggestion is a good idea, so the player does not get bored and try to move away or do something else. You should also take K120's advice about calling an external file; it will be easier to manage as the amount of code increases. You could try a loop like this:

for "_i" from 1 to 100 do {
   hint (str _i + "%");
   sleep 0.5;
};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×