editing a spell to work properly

millzy

Ultra Cool Member
Reaction score
44
ok iv got this spell that creates a shadow and attacks the owner of the shaddow the only this is i dunno how to make it so that the shadow is uncontrollable so i tryed adding locust turns out you cant add locust by triggers :(

how would i go about making it so you cant controll the shadows

Trigger:
  • Pure Shadows
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pure Shadows
    • Actions
      • Set temp_point = (Position of (Casting unit))
      • Set Temp_Group = (Units within 400.00 of temp_point matching ((((Matching unit) is A structure) Equal to False) and ((((Triggering unit) is dead) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))))
      • Custom script: call RemoveLocation (udg_temp_point)
      • Set PS_unit_lasting = (5.00 + (5.00 x (Real((Level of Pure Shadows for (Triggering unit))))))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set PS_unit = (Unit-type of (Picked unit))
          • Set temp_point = (Position of (Picked unit))
          • Unit - Create 1 PS_unit for (Owner of (Triggering unit)) at temp_point facing (Facing of (Picked unit)) degrees
          • Unit - Add a PS_unit_lasting second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Attack (Picked unit)
          • Unit - Turn collision for (Last created unit) Off
          • Animation - Change (Last created unit)'s vertex coloring to (0.00%, 0.00%, 0.00%) with 60.00% transparency
          • Custom script: call RemoveLocation (udg_temp_point)
      • Custom script: call DestroyGroup ( udg_Temp_Group)
 

Necrach

You can change this now in User CP.
Reaction score
62
Just one question, why not add Locust ability to the Shadow unit in the object editor?

Otherwise, you could put them in a loop running like a 1000 times, ordering the units to attack the target and wait half a second, so that it doesn't matter if you select them and order them to do anything else. However, I have no good experiences from Integer A loops with Wait actions, so I dunno :s
 

millzy

Ultra Cool Member
Reaction score
44
Just one question, why not add Locust ability to the Shadow unit in the object editor?

Otherwise, you could put them in a loop running like a 1000 times, ordering the units to attack the target and wait half a second, so that it doesn't matter if you select them and order them to do anything else. However, I have no good experiences from Integer A loops with Wait actions, so I dunno :s

because its not a unit it self. if you look at the trigger the type of unit is set in a variable
im not going though the object editor to create copys of all the units with locust just for this abilty
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
you could store those units within a unit group and each time a unit from that unit group is issued any order (you have to catch whether its issued by a trigger or not) re-order it to attack its target.

well, to save the target you could add the ability "rally" to your unit via triggers and set the rally point for the unit to be the target of your casted ability.
 

Necrach

You can change this now in User CP.
Reaction score
62
you could store those units within a unit group and each time a unit from that unit group is issued any order (you have to catch whether its issued by a trigger or not) re-order it to attack its target.

well, to save the target you could add the ability "rally" to your unit via triggers and set the rally point for the unit to be the target of your casted ability.

good solution with the rally point, I didn't see a way to store the target.

bad solution with my loops :rolleyes:
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
the only problem with the rally point is that i dont know whether the event to order the shadow to attack its target will avoid the owner of the shadow to set a new rally point in time.
 

RangerX

I am justice!
Reaction score
69
add all the shadows in a group then
[hand made]
Trigger:
  • event- every 0.5 seconds
    • condition-
    • action
    • pick every unit in last_group do
      • for 1 to 12 do
        • if then else
          • ((Picked unit) is in (Units currently selected by (Player((Integer A))))) Equal to True
        • do
    • Selection - Remove (Picked unit) from selection for (Player((Integer A)))
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
so i tryed adding locust turns out you cant add locust by triggers
you can add locust...

try this for adding:
Code:
add
    Events
        Player - Player 1 (Red) types a chat message containing 1 as An exact match
    Conditions
    Actions
        Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
            Loop - Actions
                Custom script:   call UnitAddAbilityBJ( 'Aloc', GetEnumUnit() )
this for removing
Code:
remove
    Events
        Player - Player 1 (Red) types a chat message containing 2 as An exact match
    Conditions
    Actions
        Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
            Loop - Actions
                Unit - Hide (Picked unit)
                Custom script:   call UnitRemoveAbilityBJ( 'Aloc', GetEnumUnit() )
                Unit - Unhide (Picked unit)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
adding locust in game hasnt gotten the same effect as to add it in the editor, neither does removing locust from a unit ingame recover the effect of the locust ability entirely.
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
and it wouldn't affect the use of his ability in w/e way?

what i undertand is that he wanted to create a "copy of the target" aka shadow that is uncontrolable (something as faide from HoN) that is uncontrolable.
with adding locust and then removing the "copy of the target" wouldn't harm the game what i can see.

the unit will be invurible and be uncontrolable wich imo atleast would be fair enough.
 

millzy

Ultra Cool Member
Reaction score
44
add all the shadows in a group then
[hand made]
Trigger:
  • event- every 0.5 seconds
    • condition-
    • action
    • pick every unit in last_group do
      • for 1 to 12 do
        • if then else
          • ((Picked unit) is in (Units currently selected by (Player((Integer A))))) Equal to True
        • do
    • Selection - Remove (Picked unit) from selection for (Player((Integer A)))

would this cause any lag also are units that are put in a unit group that die removed or do i need to add if then else unit is dead remove it from group
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
1). yes it would most probably lag late game since it is a periodic unit group leak there...

2). dead units are not removed from a unit group.
 

millzy

Ultra Cool Member
Reaction score
44
it would be better to use the event player selects a unit then
if selected unit is in unit group deselect it right??

how would i remove the leak?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
the event is rather slow, a periodic 0.01 seconds event is the most accurate for this purpose. though still it might glitch since the "unselect" function itself aint the very fastest as well.

to fix the leak you would just have to set the unit group to a global variable and destroy it after usage.

example in pseudo code:

TempGroup = Units selected by player 1 red
pick all units in TempGroup
if picked unit is shadow
remove picked unit from selection for player 1 red
call DestroyGroup (udg_TempGroup)
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
i suggest you find another way around that instead of unselecting the unit since oyu can still select it and order it to do something else before it gets unselected again.
 

millzy

Ultra Cool Member
Reaction score
44
well if u know a way of doing it other than this please tell me im a bit off using this way but it seems to be the only way
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
i suggest you add locust since it will do what you want via triggers, as acc said there is some minor bugg (wich i dont have the slightest idea of what they are) but it will serve your purpos
 

millzy

Ultra Cool Member
Reaction score
44
i tryd that but when i go add abilty to last created unit locust doesent come up
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
i tryd that but when i go add abilty to last created unit locust doesent come up

you need to use a custom script, se my post on side one.

or just use this:
Code:
Custom script:   call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )

this will add locust to lastcreated unit
 

millzy

Ultra Cool Member
Reaction score
44
ok thanks that did it but now i got this other problem when the duratation runs out the shadows die is there away to make it so the just vanish
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top