- Joined
- Jun 16, 2011
- Messages
- 80
So, if anyone has ever played the Lord of the Rings RTS game, I am trying to make my units like theirs (1 unit visually appears as many small units)
I am hoping this has already been done because its absolutely melting my brain trying to get this working.
Essentially, I want:
Issues:
Possible Solution (I cant make work):
This would be the ideal solution, because it would basically avoid the need for all triggers. and would make there be less units putting strain on CPU. However, I doubt its possible given the last bullet point i added there
What I have done so far: (just trying to make it work for 1 dummy unit currently)
NOTE:
I have some for "attack" as well, but it currently just moves them --- so its basically identical to "Smart"
I am really hoping someone has already done this --- but i have no idea what to search to find out (typing in unit group obviously just gives references to the unit-group triggers)
I am hoping this has already been done because its absolutely melting my brain trying to get this working.
Essentially, I want:
- when unit is trained or spawned - trigger places many dummy units in area around it
- these dummy units mimic the orders of their parent. moving along side them (in relation to their offset from the main unit)
- These dummy units will play attack animations when the main unit attacks (ideally with randomized wait times between attacks so it isnt perfectly synced)
- DESIRE: it would be awesome if some of these dummy units died off (and respawned) in relation to the parent units health --- but this is probably way too difficult to achieve
Issues:
- dont want to be able to select dummy units. But when i give them the locust ability (to disable selection), i no longer can grab hold of them in trigger editor by selecting units in region
- dont want these units to get bugged by collisions --- even setting collision size 0 they still collide with structures
- dont want the units to start flying (raised height) which occurs if i give them "fly" as movement type and they move over a structure--- as an attempt to overcome the issue of colliding with structures i wrote above
- dont want these units to accidentally lose their parent --- currently I just am trying to make this work by selecting units in area around main unit, that match the dummy unit type. But if 2 different main units got close to eachother, they'd steal dummy units from the other one
Possible Solution (I cant make work):
- add multiple units together in retera studio... find a way to make it so their attack animations are all shared in 1 "attack" but with each attacking at slightly different times
- this gets super janky and the imported unit uses bone connections to nodes from previous unit so they look like absolute monstrosities.
- even if this wasnt super janky --- when the unit turns, all the grouped units would just rotate around main unit, rather than rotating in spot
This would be the ideal solution, because it would basically avoid the need for all triggers. and would make there be less units putting strain on CPU. However, I doubt its possible given the last bullet point i added there
What I have done so far: (just trying to make it work for 1 dummy unit currently)
-
place
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Picked unit)) Equal to Footman_0_0
-
-
Then - Actions
-
Set VariableSet TempLoc = (Position of (Picked unit))
-
Set VariableSet TempLoc = (TempLoc offset by 100.00 towards 0.00 degrees.)
-
Unit - Create 1 Footman_Scut for Neutral Passive at TempLoc facing (Facing of (Picked unit)) degrees
-
Unit - Change color of (Last created unit) to (Color of (Owner of (Picked unit)))
-
Custom script: call RemoveLocation(udg_TempLoc)
-
-
Else - Actions
-
-
-
-
-
-
Smart
-
Events
-
Unit - A unit Is issued an order targeting an object
-
Unit - A unit Is issued an order targeting a point
-
-
Conditions
-
(Issued order) Equal to (Order(smart))
-
(Unit-type of (Triggering unit)) Equal to Footman_0_0
-
-
Actions
-
Set VariableSet TempLoc = (Position of (Triggering unit))
-
Unit Group - Pick every unit in (Units within 150.00 of TempLoc.) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Picked unit)) Equal to Footman_Scut
-
-
-
-
Then - Actions
-
Set VariableSet Temp_Location_Farm = (Target point of issued order)
-
Unit - Order (Picked unit) to Move To (Temp_Location_Farm offset by 100.00 towards 0.00 degrees.)
-
Custom script: call RemoveLocation(udg_Temp_Location_Farm)
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation(udg_TempLoc)
-
-
NOTE:
- I made them spawn for neutral passive to make it so i couldnt give them orders manually (by selecting and right clicking or ETC) since the "locust" strategy wasnt working.
- Currently this sort of works for just moving the unit using right click. However it stops working if it collides with a structure --- also need to make a different version for when you give order with a unit as target because right now if i right click a unit, it doesnt know what "target point of issued order" is
- ignore variable name "Temp_Location_Farm". I plan to make better variables when i get something working. Right now i am just utilizing a previous variable to just try and get something working.
I have some for "attack" as well, but it currently just moves them --- so its basically identical to "Smart"
I am really hoping someone has already done this --- but i have no idea what to search to find out (typing in unit group obviously just gives references to the unit-group triggers)
Last edited: