Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Ajira

Member
  • Content Count

    27
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About Ajira

  • Rank
    Private First Class
  1. Nevermind that last question.. i've made a very nice/workable solution :) In the server "loop": while {NewTargetName == _OldTargetName} do { _random = round(random(7) +1); NewTargetName = "CombatZone" + (format ["%1", _random]); }; _message = format ["Enemy forces have been sighted in %1.", (_villages select _random)]; ServerMessage = [_message, "taskNew"]; publicVariable "ServerMessage"; and then in the player init: waitUntil {alive player}; // Update the current target. "NewTargetName" addPublicVariableEventHandler { "CombatZoneMarker" setMarkerPos (getPos CombatzoneTrigger); }; "ServerMessage" addPublicVariableEventHandler { taskHint [(ServerMessage select 0), [1, 1, 1, 1], (ServerMessage select 1)]; }; //- Works like a charm, thanks for the tip guys :D
  2. but won't that spam the sideChat bigtime if there's 32 players ? or is it shown only for the current player ?
  3. Why not just do a simple {_x setdamage 1;} foreach nearestObjects [_object, [], 500]; where _object is just a random unit you spawned in the middle of town... this destroys everything in sight in a 500m radius. Houses, vehicles, trees, everything is leveled.
  4. can you be more specific ? you mean making the marker do the sideChat ?
  5. ah you mean make the trigger say it and then spawn the vehicle ? hmm...
  6. using the " " with the publicVariable solved the problem! Thanks dengibtscchon :D ---------- Post added at 11:34 ---------- Previous post was at 10:43 ---------- hmm.. now just need to figure out how to broadcast the [West,"HQ"] sideChat "New area selected."; to all players. any ideas guys ? :confused:
  7. hmm.. i prefer to use an SQF for the init, because we want to put in access control as well later on (e.g. only pilots can enter a plane, etc )
  8. Yes, but i forgot to post it on the forum. by the way, if i use this in MP on a dedicated server: _unit = format ["%1", _this]; [West,"HQ"] sideChat _unit + " is now available on base."; it gives a load of crap like like "#<number> <number> AV8B.P3D is now available on base." :confused:
  9. I think i found it.. but not sure.. will have to test in the morning.. CombatZoneTrigger setPos (getMarkerPos NewTargetName); -vs- CombatZoneTrigger setPos (getMarkerPos "NewTargetName");
  10. Yeah, that gives the name of the vehicle, but not the description/vehicleVarName.. it's different :(
  11. Ok here's the problem... on init.sqf i check if it's the server or a player that's running it. If it's a server, it starts the following loop: while {true} do { if (AreaCleared) then { while {NewTargetName == _OldTargetName} do { NewTargetName = "CombatZone" + str(ceil(random 32)); }; _OldTargetName = NewTargetName; "CombatZoneMarker" setMarkerPos (getMarkerPos NewTargetName); CombatZoneTrigger setPos (getMarkerPos NewTargetName); [West,"HQ"] sideChat "New area selected."; // Do stuff, spawn russians, etc.. } publicVariable NewTargetName; sleep 10; }; This works.. a russian spawns at the marker.. if i kill it, 10 seconds later a russian spawns on another random marker. So... the trigger is moved, and the marker is also moved. if it's a player that's running the init.sqf it runs the following code: waitUntil {alive player}; "NewTargetName" addPublicVariableEventHandler { "CombatZone" setMarkerPos (getPos CombatzoneTrigger); }; while {true} do { player setVehicleInit "_return = this execVM ""scripts\player_init.sqf"""; processInitCommands; waitUntil {!alive player}; hint "you died... sucks to be you, man... "; }; This works fine in the editor, but it doesn't do jack shizzle in multiplayer. The russian guy spawns, but the marker on the map stays rock solid on the old location. For some reason it doesn't see that the variable NewTargetName changed, and so it doesn't move the marker for the user. first of all, i thought markers were for all users, not per user ? So how come it works for player1 ( unit is "player" ), but not for player 2,3,4,5,6, etc (unit is "playable" ) ? And how come it works for player1, untill he disconnects and then reconnects ? it doesn't work anymore after that. Any ideas guys ? :confused:
  12. funny how "vehicleVarName" always returns empty in MP... anybody got an idea how to get that to show ?
  13. *facepalm* :banghead: nevermind, fixed.. thanks :blush: Been staring at the init script for so long, not thinking about the actual spawn script, hehe :p
×