(Possibly) tricky ability question

Corleone

New Member
Reaction score
44
Hey,
I've been working on a map for some time and I want my units ( tanks ) to have an ability to fire one bullet. I tried basing it off Carrion Swarm, but then the bullet can move through walls, and doesnt disappear when it hits an enemy. So, since I hardly have any experience with abilities, I ask for your help.
The ability should:
- Not be visible, nor deal any damage after it collides with a wall
- Disappear when it hits an enemy
Optional
- If two bullets collide, they both explode // destroy eachother.

What should I base it on, and how should I trigger it ( if necessary )?
 

Some1Sneakin

New Member
Reaction score
5
Sorry but it i dont think if all that is possible atleast not with that it destroys when it hit a wall and it explodes when hit another.

Maybe something of that is possible but im not sure i will see if it can get it to work
 

Corleone

New Member
Reaction score
44
I just got an idea, actually. Could it be possible to determine the angle between the casting unit and the target of the ability being cast? Then I could create a unit and order it to move towards that direction, and give it a constantly turned on immolation with 9999 dps. That would also make it possible to kill it when it exits the "arena" and when it collides with another bullet; because I could give it 1 hp. Anyway, anyone got an idea on how to figure out what the firing angle is and how to make the unit move towards that point? :p
 

hi_im_bob

......and you are?
Reaction score
44
Maybe this?

Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing (Facing of (Triggering unit)) degrees
 

Corleone

New Member
Reaction score
44
Well, i know how to make the bullet, but the hard part is to make it move in a specific direction. The only way I can think of to do this is to make 360 region ( one for each facing-angle degree ) but making that would just suck..
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
> Could it be possible to determine the angle between the casting unit and the target of the ability being cast?

Set myRealVariable = Angle between points.
 

Corleone

New Member
Reaction score
44
Well, I tried using this trigger, but the bullet wouldn't actually move ( so setting the new target didn't really work ). How can I fix this? Should I just make it 2 If//Then//Else statements, or edit something else? I probably made it way more complicated than it should be :p

Code:
Triggered Fire
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Fire! 
    Actions
        Set FireTarget = (Target point of ability being cast)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Y of FireTarget) Less than (Y of (Position of (Triggering unit)))
            Then - Actions
                Set BulletTargetY = (Point(0.00, ((Distance between (Point(0.00, (Y of FireTarget))) and (Point(0.00, (Y of (Position of (Triggering unit)))))) / 5.00)))
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Y of FireTarget) Greater than (Y of (Position of (Triggering unit)))
            Then - Actions
                Set BulletTargetY = (Point(0.00, ((Distance between (Point(0.00, (Y of FireTarget))) and (Point(0.00, (Y of (Position of (Triggering unit)))))) x 5.00)))
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (X of FireTarget) Less than (X of (Position of (Triggering unit)))
            Then - Actions
                Set BulletTargetX = (Point(((Distance between (Point((X of FireTarget), 0.00)) and (Point((X of (Position of (Triggering unit))), 0.00))) / 5.00), 0.00))
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (X of FireTarget) Greater than (X of (Position of (Triggering unit)))
            Then - Actions
                Set BulletTargetX = (Point(((Distance between (Point((X of FireTarget), 0.00)) and (Point((X of (Position of (Triggering unit))), 0.00))) x 5.00), 0.00))
            Else - Actions
                Do nothing
        Set BulletTarget = (Point((X of BulletTargetX), (Y of BulletTargetY)))
        Unit - Create 1 Bullet for Player 12 (Brown) at (Position of (Triggering unit)) facing BulletTarget
        Set Bullet = (Last created unit)
        Unit - Order Bullet to Move To BulletTarget
        Wait until ((Distance between (Position of (Triggering unit)) and (Position of Bullet)) Greater than or equal to 40.00), checking every 0.10 seconds
        Unit - Order Bullet to Night Elf Demon Hunter - Activate Immolation
        Custom script:   call RemoveLocation ( udg_BulletTarget )
        Custom script:   call RemoveLocation ( udg_BulletTargetX )
        Custom script:   call RemoveLocation ( udg_BulletTargetY )
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
"Point with polar offset" is your friend.

Set myPoint = Position of (Casting unit) offset by 800 towards (Angle from (Position of (Casting unit) to Position of (Target point of ability being cast))
Unit - Order Bullet to move to myPoint


Don't use "begins casting" in triggered spells. Go with "starts the effect of".
 

Corleone

New Member
Reaction score
44
Well, for some reason, the bullet travels a random distance now. Sometimes it goes through the entire map ( as intended ) and sometimes it just stops for no reason.
Trigger :

Code:
Fire Target
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Fire! 
    Actions
        Set FireTarget = (Target point of ability being cast)
        Set FireAngle = (Angle from (Position of (Triggering unit)) to FireTarget)
        Set BulletTarget = ((Position of (Triggering unit)) offset by 1000.00 towards FireAngle degrees)
        Unit - Create 1 Bullet for Neutral Hostile at (Position of (Triggering unit)) facing BulletTarget
        Set Bullet = (Last created unit)
        Unit - Order Bullet to Move To BulletTarget
        Wait 1.00 seconds
        Unit - Order Bullet to Night Elf Demon Hunter - Activate Immolation
        Custom script:   call RemoveLocation ( udg_BulletTarget )
        Custom script:   call RemoveLocation ( udg_FireTarget )
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
There's always a reason :p

Like, the point is outside the playable map.
Or it's in the middle of a doodad.
It's in deep water.
...


You could try to test for the pathability of that point.

Alternatively, remember the direction it needs to go, and use a periodic trigger or timer to move it in smaller steps.

I would also activate immolation right after creation, then order the move, to remove that "wait".
 

Corleone

New Member
Reaction score
44
There's always a reason :p

Like, the point is outside the playable map.
Or it's in the middle of a doodad.
It's in deep water.
...


You could try to test for the pathability of that point.

Alternatively, remember the direction it needs to go, and use a periodic trigger or timer to move it in smaller steps.

I would also activate immolation right after creation, then order the move, to remove that "wait".

Well, it could be outside the playable map area, so I think Ill go for the periodic trigger system. It cant be in the middle of a doodad or in deep water, because the map has no doodads or water ( just a very, very simple arena ). Also, I didn't activate immolation right after creation, in case the unit that fires the bullet is still too close to the bullet, and kills himself. Ah well, time to remake the trigger :)
 
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