Won't kill unit

D.V.D

Make a wish
Reaction score
73
Yea, Im just starting to make a ability from scratch and basically outlining were the actions and all will be. Well, I want to know, I tried so many different things to make this work but one of the units I make won't die. The charge(unit[0] won't die. Code:
Code:
Big Bang Attack
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Big Bang Attack 
    Actions
        Set u[2] = (Triggering unit)
        Set p[0] = (Position of u[2])
        Set p[1] = (p[0] offset by 100.00 towards (Facing of u[2]) degrees)
        Unit - Pause u[2]
        Unit - Create 1 Big Bang Attack Charge for (Owner of u[2]) at p[1] facing p[0]
        Set u[0] = (Last created unit)
        Unit - Add a 2.00 second Generic expiration timer to u[0]
        Unit - Create 1 Big Bang Attack Ball for (Owner of u[2]) at p[1] facing p[0]
        Set u[1] = (Last created unit)
        Set size = 100.00
        For each (Integer A) from 1 to 20, do (Actions)
            Loop - Actions
                Set size = (size + 10.00)
                Animation - Change u[1]'s size to (size%, size%, size%) of its original size
                Wait 0.10 seconds
        Unit - Unpause u[2]
        Trigger - Turn on Untitled Trigger 001 <gen>
        Wait 2.00 seconds
        Trigger - Turn off Untitled Trigger 001 <gen>
        Unit - Create 1 Big Bang Attack Explode for (Owner of u[2]) at (Position of u[1]) facing (Position of u[1])
        Unit - Kill u[1]
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Custom script:   call RemoveLocation(udg_p[0])
        Custom script:   call RemoveLocation(udg_p[1])
        Custom script:   call RemoveLocation(udg_p[2])
        Custom script:   call RemoveLocation(udg_p[4])

Code:
Untitled Trigger 001
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set p[4] = (Position of u[1])
        Set p[2] = (p[4] offset by 9.00 towards ((Facing of u[2]) - 0.00) degrees)
        Unit - Move u[1] instantly to p[2]
 
i cant see any mistakes here.

Trigger:
  • Unit - Add a 2.00 second Generic expiration timer to u[0]


Try puttin this under
Trigger:
  • Set u[0] = (Last created unit)
 
well for the first you triggers leak like %#!& and lets starts by cleaning that up ...

Add these Custom Scripts at the end of the first trigger:

call RemoveLocation(udg_p[1])

call RemoveLocation(udg_p[0])

then you need to set this:

Code:
(Position of u[1])
into a variable as well, and then use this custom script to remove the leak:

call RemoveLocation(udg_p[3]) <-- if that what you variable name is XD

and for the second trigger you need 2 point variables, one for (Position of u[1]) and one for offset by ... and then remove those leaks too.
 
Cleaned up the code, put the timer after he is set. Still won't work.
 
No revival system and the unit doesn't die because its animation doesn't reset.
 
Umm, I don't think you ever killed u[0], and you killed u[1] twice..

Edit: Never mind, you only killed u[1] once.
 
Yeah dude, you didnt EVEN put a kill u[0]

Edit: sorry didn't see the expiration timer
 
General chit-chat
Help Users
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top