Jump to content

James Grimm

Member
  • Content Count

    14
  • Joined

  • Last visited

  • Medals

Everything posted by James Grimm

  1. Hello people! I want to add a box in my mission where players can enter text and that text then becomes a variable. I tried using the RscEdit but was unable to figure it out. Was unable to find a defines for it. If anyone happens to sit on some code to make this happen that would be appreciated. A box where you can write things in a dialog and save them as a variable.
  2. Thank you it works now. as you can tell I'm new to this. So thank you for your patience.
  3. What I want to do is add an action that updates for a sign every sec to display how long time is left for the cooldown. In the while loop, i want the %1 to be _1. _tele = _this select 0; _caller = _this select 1; _sign = TestSign; _Cash = score _caller; _i = 5; hint format["you have %1 in cash",_Cash]; while {_i>0} do { removeAllActions _sign; _sign addAction ["Cooldown %1",""]; sleep 1; _i = _i-1; }else { removeAllActions _sign; _sign addAction ["Buy scope WIP","PengarFraga.sqf"]; };
  4. I've got closer it needs to be like this I think TestSign addAction format["Cooldown %1",]; but I don't know where to put the variable for _i
  5. I don't understand where in this command(TestSign addAction ["Cooldown %1",""];) to I put the format [Cooldown %1, _i]; @Schatten
  6. Hello there, Is it possible to have 2 triggers on that both check if there is a player inside. If both of them are true then a code will run. I am new to coding so please provide lots of details and a sample. 'Thanks!
  7. Ok, now I want you all to know that I started scripting a few days ago and as most of you can understand I am not a genius just yet. All I need help with is to make a code run while the trigger is activated. something along the lines of. "while" _Caller is in the trigger run (_caller addScore 10 .... sleep 5) So pretty much while the player is in the trigger he will be given score every 5 seconds. And on top of that I know how you make an sqf run via (addAction) but how do you make an sqf run when a trigger is activated / a player enters the trigger. Sorry for the stupid questions trying to learn.
  8. I have simply added a sign with addAction.... and that activates this code _caller = _this select 1; _caller addScore 10; This works for me in-game i get my score added but does not work for my friends that joined the game. is there a alternative that works for MP`?
  9. James Grimm

    Why dosent _caller work in MP?

    Whilst you're at it @Sgt. Dennenboom ;) any idea why this is not working? _tele = _this select 0; _caller = _this select 1; Cash = score _caller; if (Cash > 99) then { //line 20 _caller addScore -100; Offroad setPos (getpos (OffroadStart)); _caller moveingunner Offroad; _i = 35; while (_i>1) do { hint format[_i]; //Not working sleep 1; _i = _i-1; }; sleep 35; Offroad setPos (getpos (OffroadEnd)); Offroad setVehicleAmmo 1; Offroad setDamage 0; _caller setPos (getpos (OffroadEnd2)); } else { hint format["You dont have enough cash. You have %1",cash]; }; In game, i get an error that says http://prntscr.com/hw2g3w (Line 20 has been marked by a comment ) But why does all code below the while statement refuse to run and I don't get the timer I've made. And yes I know I need to change _caller addScore -100; from here as well.
  10. James Grimm

    Why dosent _caller work in MP?

    Legend! Thanks alot
  11. James Grimm

    Simple trigger help

    Ok, fantastic. I've got one more stupid question for you. on the point of while loops https://prnt.sc/hw0ipm _tele = _this select 0; _caller = _this select 1; Offroad setPos (getpos (OffroadStart)); _caller moveingunner Offroad; i = 35 while (i>1) then { hint format["you have %1 Secounds left",i]; sleep 1; i = i-1; } sleep 35; Offroad setPos (getpos (OffroadEnd)); Offroad setVehicleAmmo 1; Offroad setDamage 0; _caller setPos (getpos (OffroadEnd2)); that code worked until I added the while loop what it does it teleport an offroad form one place to another teleports the player inside waits 35 sec (Where I tried adding a timer) and then teleport everything away and repairs. But the loop doesn't work and everything after the loop doesn't run. here is the error message i get in-game http://prntscr.com/hw098x
  12. James Grimm

    Simple trigger help

    Thanks for all the help Gc8 That worked great! But why have you got to put in in the init.sqf? does that constantly run or something?
  13. James Grimm

    Simple trigger help

    Ok as I said I am very new to this. would you mind explaining what the _plr = _x means?
  14. James Grimm

    Simple trigger help

    How would one go about doing it in multiplayer? @gc8 Thanks for the help. and I simply added a sign where you can get score _caller = _this select 1; _caller addScore 10; This works for me but not for if my friends try it no score gets added
×