Jump to content

Dreadleif

Member
  • Content Count

    47
  • Joined

  • Last visited

  • Medals

Community Reputation

4 Neutral

About Dreadleif

  • Rank
    Lance Corporal

Profile Information

  • Gender
    Not Telling
  • Location
    Norway

Recent Profile Visitors

569 profile views
  1. 1. Yes 2. Yes, nothing wrong. 3. Works as expected. 4. Went through them again. The only thing I can imagine is that the "Seized By" condition set in the trigger isn't corresponding with "triggeractivated tre_opforcaptured" in the script condition. Even though the trigger is set to repeatedly, maybe the script registers the trigger as always true, once it has been seized only once in the past? Only solution I can think of =(. It's okay, I can do a work-around, but was hoping to fix this. Thanks and liked :)
  2. My trigger is set to activate when blufor is present, repeatedly. For some reason it's not checking the IF conditions in the script. The result is that the units are spawned even when "tre_opforcaptured" (a simple opfor-present-repeatedly trigger) isn't currently activated. What noob mistake have I done here? Thanks! :) Trigger onAct: null=[] execVM "scripts\opfor\tre_Spawn.sqf"; tre_Spawn.sqf sleep 4; if (isserver and triggeractivated tre_blufor and triggeractivated tre_opforcaptured) then { //SPAWN GROUP _grp = createGroup EAST; //UNIT AMOUNT, ITEMS, LOCATION (CHANGE MARKER) for "_i" from 1 to round (random 4) do { _soldier = _grp createUnit ["O_G_Soldier_lite_F",(getmarkerpos "spawnguard_tre"),[],0,"NONE"]; removeAllWeapons _soldier; removeAllItems _soldier; removeAllAssignedItems _soldier; removeVest _soldier; _soldier addweapon "arifle_Mk20_F"; _soldier addMagazines ["30Rnd_556x45_Stanag", 6]; _soldier setFace "AfricanHead_02"; }; {_x addEventHandler ["Killed",{[_this select 0] execVM "scripts\DeleteDeadBody.sqf" } ]} forEach units _grp; //SET SKILL (CHANGE); {[_x] execVM "skill_2.sqf"} forEach units _grp; //ADD PATROL AND BEHAVIOR; {[_x] execVM "scripts\opfor\aipatrol.sqf"} forEach units _grp; //SPAWN GROUP _grp = createGroup EAST; //UNIT AMOUNT, ITEMS, LOCATION (CHANGE MARKER) for "_i" from 1 to round (random 4) do { _soldier = _grp createUnit ["O_G_Soldier_lite_F",(getmarkerpos "spawnguard_tre2"),[],0,"NONE"]; removeAllWeapons _soldier; removeAllItems _soldier; removeAllAssignedItems _soldier; removeVest _soldier; _soldier addweapon "arifle_Mk20_F"; _soldier addMagazines ["30Rnd_556x45_Stanag", 6]; _soldier setFace "AfricanHead_03"; }; {_x addEventHandler ["Killed",{[_this select 0] execVM "scripts\DeleteDeadBody.sqf" } ]} forEach units _grp; //SET SKILL (CHANGE); {[_x] execVM "skill_3.sqf"} forEach units _grp; //ADD PATROL AND BEHAVIOR (CHANGE); {[_x] execVM "scripts\opfor\aipatrol.sqf"} forEach units _grp; } else { };
  3. Folkene som later som de er eksperter har for mye stolthet til å hjelpe deg. ^ The experts on this forum will solve it for you proudly. Below is about as far as I got, and from the coded and pedagogically "special" guides I got from the Spocks of scripting at the time ;), the most I was able to grasp from their arcane scribblings was something about remoteExec.. If I knew how, I'd explain how to do this for you in 10 words or less. init of unit this addaction ["Rig Car", {playSound "rigging"; "scripts\rig.sqf" remoteExec [ "BIS_fnc_execVM",2 ] }]; rig.sqf _nul = rigcar remoteExec [ "removeAllActions", 0, true ]; //Remove action for all players sleep 15; riggedcar setdamage 1; }; This is the only thing I've gotten working with this method. Global commands like setdamage will work, but not local ones.. It seems like after this much communicating back and forth, we'd have some definite guide on this by now. If I knew it, I'd share it with you, nord brother. Hail Ulfrik. :803:
  4. Thanks for the feedback, dreadedidentity, and thanks for the tip about sleep. I'll put that in all my looping scripts from now on. You're right that I have done a lot of searching and work to figure out how to script for multiplayer in a very short time. Before any post I make, I have worked on and searched for the problem for at least 2 hours. If you see a lot of posts from me recently, it's the fact that I have a weeks vacation now to just work on this map that I'm developing for my friends, and to develop my scripting skills. Said skills have leaped from no knowledge at all, to being able to do almost anything in MP in just a few weeks thanks to the great people who hang out here (you're the best guys). I push my boundaries, that's why you see me asking questions. I have to say that this was a bit demeaning, and I'd never say this to someone who was learning a field I was an expert in. More importantly it's bad advice, as learning complex SP-scripting will screw you over more times than help you, if what you want to do is get better at making MP-missions (i know from experience). Sort of like an author telling a teenager who is trying to write a write book that he should stick to a coloring book - it's not really relevant for what that person wants to accomplish. All of my multiplayer maps have been perfectly synced up to this problem with the looping script, and now it won't pop up ever again because I found the solution. I know how to create consistent MP maps with custom GUI's that spawn custom websites in-game, which link to scripts that do very advanced stuff, store functions and play videos in-game. I know a lot more than most MP-scripters already after just a few weeks, but I come here to iron some things out. My questions are relevant and not asked specifically before, otherwise I'd find it with a search. If I stuck to SP-scripting I would never advance in the field I want to learn, and I have no interest in SP-maps, but I do think your intention was good, if perhaps a bit jaded. I also have gotten feedback that my questions have been useful to other scripters, and I have helped other beginner-scripters solve their problems on many occasions, and don't see the problem with helping noobs out with new problems. In any case, thanks for the tips on the sleep in a loop, you're obviously a very skilled scripter, and no thread will be made about this problem in the future :).
  5. Dreadleif

    Enemy overrun script

    Trigger: OPFOR, Present Condition: (east countSide thislist) >= 41; OnAct: endMission "END2"; Add a countdown if you don't want it to seem too instant. Or a timeout if you want to give yourselves some chance to bring the number down again once it reaches above 40. Or if you need to check for it in the end of a script, remove the onact from the trigger and put it below "waituntil {triggeractivated triggername};" in the script
  6. Thanks both of you! I will do exactly that. :D Liked and changed to solved.
  7. Liked! [EDIT] It worked. You're amazing, I don't know why, but it worked. Gonna look into spawn. :D
  8. Hey! :D Thanks in advance for any help. Problem: The second my "loopmarker" scripts at the bottom of my init.sqf start running, everyone desyncs from the server. I can see the players running around, and I can do stuff, but they see me running in place and can't interact with anything. I run non-dedicated server for friends. All the scripts work perfectly in single player. When I do a test to only remove the loopmarker scripts before hosting, everything works fine, so I know that they are making it desync. Is there some way to make them less taxing or rearrange this? I heard something about precompile, but I didn't get it - is that the solution, or how would you rearrange this (I'm fairly new to scripting)? :huh: init.sqf //KJØR STARTING SCRIPTS [] execVM "scripts\MAKEBUILDINGS.sqf"; [] execVM "scripts\MAKEBUILDINGSstatic.sqf"; [] execVM "scripts\friendlyfire.sqf"; [] execVM "scripts\removegearkilled.sqf"; sleep 1; [] execVM "scripts\ATM1.sqf"; //[] execVM "scripts\Mapactivated.sqf"; sleep 1; //SCRIPTS FOR INCOME [] execVM "scripts\blufor\cash_power.sqf"; // UNIT LOADOUT ON RESPAWN [west, "WEST1"] call BIS_fnc_addRespawnInventory; // REDRESSING null = [RESISTANCE, true, true] execVM "JSHK_Redress\redressInit.sqf"; //TESTING "GLB_Sound" addPublicVariableEventHandler { private ["_Gsound"]; _Gsound= _this select 1; player say _Gsound; }; if (isServer) then { sleep 100; [] execVM "scripts\opfor\loopmarker_mid_1.sqf"; [] execVM "scripts\opfor\loopmarker_mid_2.sqf"; [] execVM "scripts\opfor\loopmarker_mid_3.sqf"; [] execVM "scripts\opfor\loopmarker_mid_4.sqf"; [] execVM "scripts\opfor\loopmarker_mid_5.sqf"; [] execVM "scripts\opfor\loopmarker_mid_latest.sqf"; sleep 100; [] execVM "scripts\opfor\loopmarker_flank_1.sqf"; [] execVM "scripts\opfor\loopmarker_flank_2.sqf"; [] execVM "scripts\opfor\loopmarker_flank_3.sqf"; [] execVM "scripts\opfor\loopmarker_flank_4.sqf"; [] execVM "scripts\opfor\loopmarker_flank_5.sqf"; [] execVM "scripts\opfor\loopmarker_flank_latest.sqf"; sleep 160; [] execVM "scripts\opfor\AttackMid_1.sqf"; [] execVM "scripts\opfor\AttackFlank_1.sqf"; }; All the loopmarker scripts are identical, here is a sample. This script is the problem ----- LoopMarker_Mid_1.sqf while {true} do { if (!triggeractivated HQ_bluFORCAPTURED && triggeractivated one_bluFORCAPTURED) then { "attackspawn_middle" setMarkerPos getMarkerPos "spawnguard_HQ"; "attacktarget_middle" setMarkerPos getMarkerPos "spawnguard_one"; } else {sleep 19}; }; Why do they make the server desync? I really hope someone has the answer as I've been working many, many days on this map and now it's unplayable. I'm going to bed so can't respond to questions, but I shall praise the person who posts an example for solution :).
  9. Hey, thanks for wanting to help :). So, I need some things to happen a certain number of times, once the conditions are true. But I'm struggling to design a script that works like that. After a lot of searching and trying I came up with this, but it doesn't work: _incomeCount = -1; _limit = 4; while {(_incomeCount) < (_limit)} do { if (triggeractivated four_bluforcaptured) then { cash = cash + 2000; _incomeCount = _incomeCount + 1; sleep 60; } }; The script is run at mission start from the init.sqf. What it tries to achieve is that once the trigger "four_bluforcaptured" is true, a timer will start and "cash = cash + 2000" will be run every 60 seconds, for 4 loops, and then come to a complete stop with a new message.
  10. _nul = [Dave,1] remoteExec [ "removeaction", 0, true ]; //Remove action for all clients and JIP Still not sure about how it works exactly, but I think this did it. Responded as fast as I could. :)
  11. Hello! Hope you're having a good day, and thanks for wanting to help someone. :D I've read the remoteExec page but I can't understand how to structure a normal command like "dave removeaction 0" inside a remoteExec. How would I transform this into a "removeaction 0" instead of removeallactions? I'm totally green on these commands. _nul = NPC1 remoteExec [ "RemoveAllActions", 0, true ]; //remove action for all ______________________________________________________________________________ My full script for anyone interested (in case anyone wants to show me a better way to build the whole thing for MP, but not required reading for answering the question): if (cash < 12000) then { hintSilent parseText format["<t size='1' color='#00FF3C'>You don't have enough money</t>", d]; } else { cash = cash - 12000; _nul = Dave remoteExec [ "RemoveAllActions", 0, true ]; //remove action for all //"TALK" Dave say3D "Dave"; Dave setRandomLip true; sleep 3; Dave setRandomLip false; buytruck setVehicleLock "UNLOCKED"; hintSilent parseText format["<t size='1' color='#00FF3C'>Received keys for military truck</t>", d]; } }; The above script is called in multiplayer from the NPC's init: this addaction ["Buy Military Truck for $ 19000", {"scripts\npc\talk_dave.sqf" remoteExec [ "BIS_fnc_execVM",2 ] }]; Thanks!
  12. I have no friggin idea why, but it works exactly opposite of intended. The second blufor captured a city, the spawning starts there, and the target marker moves to the opfor city infront. What's wrong here? _________________________________________________________________________________________ UPDATE: I FIXED IT. I had two "seized by" triggers overlapping, and they were being used in the conditions of one script. I assumed they would show OPFOR - captured by at the same time, thus making them reliable as conditions for my script, but it turns out that these two triggers, though completely aligned, were totally random with what they condiered someone conquering that sector. Lesson: If you're gonna used Seized By triggers, don't use two opposite ones to control an area. They will never agree on who's actually seizing the area.
  13. I see! This is what I had initially. I tried the IF thing inside the WHILE, but it seemed to just mess up, almost like it was checking for the opposite.. I will try it again and get back here if I fail. :)
  14. No, not at all, thanks for the suggestion though. :) Oh, wow, I've tried explaining this one time already and was not successful. I have 5 scripts constantly checking if conditions are true, to spawn soldiers in one camp and send it to the next, if the first camp is theirs and the next camp is not theirs. So this is one of those five scripts. It doesn't matter if two of them return true at the same time. Summary: The script needs to check if triggeractivated four_OPFORCAPTURED && !triggeractivated airbase_OPFORCAPTURED}; constantly thoughout the mission, every 5 seconds, and when its true, move the markers as seen above. The goal is that if any one of the cities is captured by opfor, and the one in front is captured by blufor, it will move the spawning marker to the opfor city and the target marker to blufor city. There is only one each of the target and spawn markers.
  15. while {triggeractivated four_OPFORCAPTURED && !triggeractivated airbase_OPFORCAPTURED} do { "attackspawn_middle" setMarkerPos getMarkerPos "spawnguard_four"; "attacktarget_middle" setMarkerPos getMarkerPos "spawnguard_airbase"; sleep 5; }; Not working at all. Is it the { } instead of ( ) ? Noob scripter, started recently. Thanks!
×