Jump to content

Northup

Member
  • Content Count

    51
  • Joined

  • Last visited

  • Medals

Everything posted by Northup

  1. I am trying to figure out how to make all infantry on every team use "iconManVirtual_ca.paa" as their icon, with the player icon set as green (that part I figured out thanks to the above dialogue). I'd also like to add a red mildot along with the red iconplayer_ca.paa.
  2. I'm working on a mission where there will be 2 towers stacked on one another. What I want to do: Automatically destroy the top tower if the bottom one is destroyed. It's fine if both must be destroyed, though it would be nice if the bottom one could still be functional if the top one was destroyed.
  3. Good info. However, I've decided to leave towers as they are. My predilection for detail was getting the better of me. I already added portable rugged lamps to every level of the tower, which all are attachedto tower, plus a trigger drawing icons. I don't want to have to create an array of all rugged portable lights to destroy them when the tower goes down. I figure if the host has issues with the towers, they can just delete them in the editor.
  4. That throws Undefined variable in expression: _wreck
  5. Is there a way to reference the swapped model after an object is destroyed? I want the tower collapse animation to play, but want it to never replace the top tower with the damaged model (or delete it immediately).
  6. Forgot to validate if this would work in an MP environment. I tried swapping with addMPEventHandler, but handledamage returns an unknown enum value.
  7. No worries! Both approaches are helpful. Thanks!
  8. I need to get the position 6 markers. All markers follow a naming convention kavala_tower_1, pyrgos_tower_1, kavala_tower_2, pyrgos_tower_2 (every zone has 6 towers, 26 zones) etc. I have set up a trigger that will execute the following script: [] spawn { waitUntil{!isNull findDisplay 12}; findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",{ (_this select 0) drawIcon [ getMissionPath "\images\tower1_ca.paa", [1,1,1,1], getMarkerPos "kavala_tower_1", 20, 20, 0, "", false, 0.03, "TahomaB", "right"]; }]; }; //Rinse, wash repeat for towers 2, 3, 4, 5, and 6. While that works, it seems needlessly convoluted and time consuming. Instead, is there a way to get the script script to return every marker named ANYCITY_tower_1, ANYCITY_tower 2 only within the trigger zone?
  9. So multiple triggers exist, one for each zone. Only one trigger can be active. You are correct in that all the triggers do is add icons to specific areas of the map. The idea is that only icons in the active zone are shown. Active zone lasts the entire mission (MP), then a new zone is loaded on the next mission. Not sure how else I could show these icons on the map without a trigger in each zone, without also showing every tower on altis called "tower_1", etc. My next step would be to delete all other triggers as soon as one is activated, but not sure if that approach is the best one. You've given me something to chew on though! Edit: Didn't realize this would ditch the sqf, so took me a minute but it works as it (minus the comments, obv.)! Thanks!
  10. This works great for a specific trigger. Is there a way to pass thistrigger instead of yourtriggername? Or perhaps any activated trigger with "TowerTrigger" in the name? The goal is to be able to plop a trigger, have it call a script that does the above, but for any trigger. Using this would still require 26 scripts. Apologies, I am fairly new at this.
  11. Thanks for the reply! Unfortunately that threw an error type bool, expected number. Line 23. Also, perhaps I should have mentioned each tower has its own numbered icon. So tower1_ca.paa has to appear at tower_1 marker location. My lizard brain attempted to also initially tried to pass "thistrigger" from the trigger to the sqf, so that the sqf isn't relying on the name of the trigger, but rather activates when any trigger calls it.
  12. I removed the comment, but this doesn't seem to work for me. I am sure I am doing something wrong. I have a trigger that executes an sqf that gets the position of an invisible marker and draws an icon there. This works fine on the main map, but I get no errors. I am not using any mods. Everything is vanilla. params [ ["_position",[],[[]]] ]; _marker = createMarker ["tower1", _position]; _marker setMarkerShape "ELLIPSE"; _marker setMarkerSize [1,1]; _marker setMarkerBrush "SolidBorder"; _marker setMarkerAlpha 0; _marker setMarkerColor "ColorOPFOR"; sleep 0.5; [] spawn { waitUntil{!isNull findDisplay 12}; findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",{ (_this select 0) drawIcon [ getMissionPath "\images\tower1_ca.paa", [1,1,1,1], getMarkerPos "tower1", 20, 20, 0, "", false, 0.03, "TahomaB", "right"]; }]; }; [] spawn { waitUntil {!isNull (uiNamespace getVariable ["RscCustomInfoMiniMap", displayNull])}; disableSerialization; private _display = uiNamespace getVariable ["RscCustomInfoMiniMap", displayNull]; private _miniMapControlGroup = _display displayCtrl 13301; private _miniMap = _miniMapControlGroup controlsGroupCtrl 101; _miniMap ctrlAddEventHandler ["Draw", { (_this select 0) drawIcon [ getMissionPath "\images\tower1_ca.paa", [1,1,1,1], getMarkerPos "tower1", 20, 20, 0, "", false, 0.03, "TahomaB", "right"]; }]; };
  13. In case anyone else comes across this: Name your top and bottom towers Top_T1 and Bottom_T1 In init of bottom tower: this addEventHandler ["Killed", { params ["_unit"]; Top_T1 setDamage 1; }]; this addEventHandler ["HandleDamage", { params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; private _previousDamage = [_unit getHit _selection, damage _unit] select (_selection isEqualTo ""); private _newDamage = _damage - _previousDamage; (_previousDamage + ((_newDamage * 0.7) min 0.2)) }]; In init of top tower: this addEventHandler ["HandleDamage", { params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; private _previousDamage = [_unit getHit _selection, damage _unit] select (_selection isEqualTo ""); private _newDamage = _damage - _previousDamage; (_previousDamage + ((_newDamage * 0.7) min 0.2)) }]; This will allow the top tower to be destroyed, while leaving the bottom tower standing. Destroying the bottom tower will destroy both, since otherwise, there would be a floating inaccessible tower. The event handler will reduce the damage so that a single satchel won't destroy a tower. Alternatively, you could also just delete the top tower when the bottom one is killed, but it doesn't look as cool 🙂 However, if players exploit it by paradropping, it may make sense to do so, since the destroyed towers maintain position. The alternative I didn't yet try would be to set the position of the top tower slightly lower before setting damage to 1, so that after it explodes it is reachable on foot. Probably would look silly. Thanks for the help.
  14. Not sure what caused it. I added another event handler to reduce damage. Maybe that fixed it? Either way, it appears to be working now. Thanks for the suggestions!
  15. On further testing, this appears to make the top tower invincible. It will only be destroyed if the bottom tower is destroyed.
  16. Edit: Now I need to find a way to reduce tower damage so that a single satchel charge doesn't kill it. Will a similar event handler also work on the towers?
  17. Worked like a champ. Thanks!
  18. This is ancient, but for anyone else, iirc you just need to add the sector tactics module alongside your Sector Control Module, but don't sync it. At your base/spawn, add an AI spawn module, followed by an AI spawn point. Sync the AI spawn module to the AI spawn point, then select all the units you want going after sectors, and sync them to the AI Spawn Module (and not the AI Spawn point). This should be sufficient. I've found that most will completely ignore any vehicles.Like OP, I used waypoints with very limited success (not that their driving is work anything). The Sector Tactics module should stay unsynced to anything. If you want CAS or any other kind of AI support stuff, you'll need to use the support modules.
×