Summonable Unit Trigger

  • Thread starter Thread starter maerlyn
  • Start date Start date
M

maerlyn

Guest
I have this trigger, and it works nicely, (except that there's no limit on how many Gnolls you can summon.)

Captured Gnoll is Used
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Captured Gnoll
Actions
Unit - Create 1 Gnoll for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees

But I'm wondering - is it possible to make the Captured Gnoll item create a Gnoll when clicked, like it does, and then remove that same Gnoll when it's clicked again? And then have a cooldown applied to the item? And then after the cooldown is over and the item is clicked again, an entirely new Gnoll is summoned, etc.?
 
mems said:
base your ability from fearal spirit make it an item ability

How would that work? Would I be able to summon and unsummon my Gnoll?
 
Make 2 Feral Spirits - one for the Gnoll and one for a dummy unit.

The Dummy unit Feral will have the following
-Locust (so you can't click on it)
-0.01 second duration
-no animation, no summoning animations

then make 2 items, one for each spell (the real Feral must have a cooldown)

When you use the real Gnoll spell, remove that item and replace it with the dummy item. Since the game only allow 1 Feral cast in the game at one time, your Gnoll will be dispelled when you use the dummy item since they are both Ferals. Then you replace the real thing back into the hero, and it will still have a cooldown timer ticking.
 
Thanks for the replies. I tried that thing with Feral Spirit and decided it was a little clunky. So I made my own trigger! Check it out:


Code:
Captured Gnoll is Used
    Events
        Unit - A unit Uses an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Captured Gnoll
    Actions
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        SummonedUnitsItem[(Integer A)] Equal to (Item being manipulated)
                    Then - Actions
                        Unit - Remove SummonedUnitsUnit[(Integer A)] from the game
                        Set SummonedUnitsItem[(Integer A)] = No item
                        Set SummonedUnitsUnit[(Integer A)] = No unit
                        Skip remaining actions
                    Else - Actions
        Unit - Create 1 Gnoll for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        SummonedUnitsItem[(Integer A)] Equal to No item
                    Then - Actions
                        Set SummonedUnitsItem[(Integer A)] = (Item being manipulated)
                        Set SummonedUnitsUnit[(Integer A)] = (Last created unit)
                        Skip remaining actions
                    Else - Actions


I have two arrays, one keeps track of the Item that corresponds to the Unit (which is the other array). SummonedUnitsItem[x] is the item for the summoned creep SummonedUnitsUnit[x].

It works. Now the only things are cooldown, and making it work for all the creeps. Does anyone have any ideas regarding making this trigger work for any creep? I was thinking of having a lookup table...

EDIT: don't worry, I figured it out.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Hey Ghan, whatever cron job its part of its not running its been the same for days. If it does not work can we remove it?
  • The Helper The Helper:
    LOL! A tweak job!
  • The Helper The Helper:
    this is the fix I get from that yeah this is hard to control. disabling bots is pretty much necessary as ai and other bots would push really old threads to the top. reduce weight of view count. disable guest view tracking if you really want to push active threads to the top. a bit of tinkering for a few days with the weights and other settings should get you a decent trending widget box.
  • Ghan Ghan:
    I changed the settings a bit.
  • Ghan Ghan:
    Narrowed it to 7 days for the half-life and set views to 0 weight.
  • The Helper The Helper:
    I dont think Trending would work for this forum it would be better to just have the last 5 posts from anywhere
  • Ghan Ghan:
    Probably will have to give it some time to update.
  • Ghan Ghan:
    I'm guessing it is not retroactive.
  • Ghan Ghan:
    Next on the punch list: Update the server to Ubuntu 24.04.
  • The Helper The Helper:
    Mad Lads is new I see it displays original post date
  • The Helper The Helper:
    as long as it changes it is good - it is good now it updated and its new stuff
  • The Helper The Helper:
    One thing I have noticed and I dont know if it is by design but like 1 out of 3 times I come to the site the Anubis screen just hangs open, if I refresh it will go away but sometimes it hangs
  • Ghan Ghan:
    I've seen that as well.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1

The Helper Discord

Staff online

  • Ghan
    Administrator - Servers are fun

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top