System Projectile

Troll-Brain

You can change this now in User CP.
Reaction score
85
JASS:
native GroupAddUnit                         takes group whichGroup, unit whichUnit returns nothing


Seems to return nothing for me. :|

Meh, sorry then i was pretty sure o_O

EDIT : Hmm saying two big shits in few time, time to go to bed ...

EDIT 2 : Not really a good excuse, but it's because i did it like that with my UnitList, and mess up with UnitAddAbility.
 

Kenny

Back for now.
Reaction score
202
Version 1.0.1 (Beta) released. Check my first post for the full updates list (basically added everything listed in one of my previous posts).

Still looking for feedback and criticisms. :)

Edit:

I am pretty happy with where this is at in terms of its interface and functionality. So if there are no major quarrels with those parts of the system, I think I will move this out of Beta in the next update. :)

Edit:

Still looking for feedback/answers for my delayed removal question and the question regarding projectile collision.
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
Yeah, if you look at the horses, they do not seem to face the correct direction. Yes, those riflemen are equipped with horse cannons.

Not sure if it's a problem on my end, though.

I've attached the map for you to have a look (make the rifleman attack stuff).
 

Attachments

  • horse_cannon.jpg
    horse_cannon.jpg
    158.4 KB · Views: 334
  • PJ0002.w3x
    142.5 KB · Views: 280

Kenny

Back for now.
Reaction score
202
Lol!! That is freakin' hilarious. Riflemen equipped with horse cannons! Why didn't I think of that.

As for your problem:

[ljass]Projectile.create(xPos,yPos,zPos,facing)[/ljass] <-- Facing is in radians as per the documentation.

I believe your [ljass]AngleBetweenPointsXY(x1,y1,x2,y2)[/ljass] function returns the angle in degrees. :D
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
Whoops.

Also, I left like 30 riflemen firing at the tank for 2 hours (I fell asleep lol), and when I got back War3 was using 400MB of RAM (as opposed to the 120MB it used at the start). Food for thought (although I may be leaking something haha).
 

Kenny

Back for now.
Reaction score
202
Leaving warcraft on for two hours doing anything would increase its RAM usage (just not by that much). Did you have unit recycling on or off?

If it was off, you probably created somewhere near 110,000 units in 2 hours, which is what would cause the usage to go up like that. If it was on, I don't know what's up..

Edit:

Added some tiny changes to he next update that help with multiple projectile collisions simultaneously. Haven't found anything else wrong with it yet.
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
No, I didn't have recycling on. I'll repeat the test with it on - but it's probably unreliable, I might have leaks in my system somewhere.

EDIT: You aren't using instant facing with projectile recycling? Memory still goes up, but I think it's a problem on my side somewhere.
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
isUnitInHeightRange() does not seem to factor in terrain height properly.

Take a group of gunships, and attack the AA missile tanks on the ledge to the north. You might want to turn on whosyourdaddy (AA hurts a lot) and iseedeadpeople. The gunships will be unable to kill them. Now take the gunships and kill the battle tanks on ground level to the north of the ledge, or attack the AA missile tanks in the bottom-right corner, and you will find the gunship rockets will destroy them.
 

Attachments

  • PJ0005.w3x
    170.8 KB · Views: 284

Kenny

Back for now.
Reaction score
202
You aren't using instant facing with projectile recycling? Memory still goes up, but I think it's a problem on my side somewhere.

That instant facing crap doesn't work properly with arced projectiles and doesn't seem to be -very- effective with everything else... I just don't find it reliable enough for something public.

As I said earlier, I am willing to add recycling, but it would only really be useful for those with non-arrow like projectiles (projectiles that can face any direction).

isUnitInHeightRange() does not seem to factor in terrain height properly

If you read the documentation, I think it says something about that method only being for simple vertical collision, because that stuff is basically impossible to do properly for multilpe maps (I am attempting to come up with something better).

For it to work properly you would need:

- A real array that stores the approximate height of every model (unit type) used in your map.
- Some way to set and access the array (unit indexing or raw code hashing).
- And then a function that does something similar to mine, but then uses the height of the target unit stores in the array.
- And some fancy terrain height stuff as well.

That is far to complex or static for a public system.
 

black.sheep

Active Member
Reaction score
24
Could you give us a simple Fire2dProjectile function? Or atleast explain to me how to fire a simple 2d projectile, I dont really get it.
 

Viikuna

No Marlo no game.
Reaction score
265
That instant facing crap doesn't work properly with arced projectiles and doesn't seem to be -very- effective with everything else... I just don't find it reliable enough for something public.


It does work properly. Whats exactly your problem with it?
 

Kenny

Back for now.
Reaction score
202
Could you give us a simple Fire2dProjectile function? Or atleast explain to me how to fire a simple 2d projectile, I dont really get it.

There is a demo spell in the map that does simple 2D projectiles. It is called Hurl Boulder.

It does work properly. Whats exactly your problem with it?

I cannot get it to work with arcing projectiles.

When using it with normal 2D projectiles, they all seem to face the ground instead of the target location.

Grim001 said himself that it is only worthwhile for projectiles that will only ever face one set of coordinates or one unit. He also said it doesn't work well with the SetUnitAnimationById() trick we all use.

Taken from his instant facing tutorial:

You can't use this instant facing stuff in conjunction with the dummy model's pitch animations.

So, this trick is only useful for projectiles that face one angle or follow one unit and never change from that until they get recycled.

To me it just doesn't seem stable enough for a public system..
 

Viikuna

No Marlo no game.
Reaction score
265
You are not supposed to call that SetUnitLookAt every .03 seconds, you know...

Just use it when SetUnitFacing is too slow. ( Projectile makes a sharp turn, or is recycled )


It works just fine.

The real problem manifests when you want to have roll rotation too. Then you must either use SetUnitPosition trick, which is fucking slow, or use some movable dummies to control your projectiles facing, which Im not sure if it works perfectly, though.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Then you must either use SetUnitPosition trick, which is fucking slow,
Yes, it is slower than SetUnitX+Y by 2700%+-
 

Viikuna

No Marlo no game.
Reaction score
265
Aye.

Thats why Id rather play with 2 dummies per projectile and control facing like that, if I wanted roll for projectiles.
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
But you don't need roll rotation - it's something so trivial.
 

Kenny

Back for now.
Reaction score
202
You are not supposed to call that SetUnitLookAt every .03 seconds, you know...

I know that. :)

I only ever used it when the units were recycled, still didn't look good. Arrows faced \ (down, but still kinda forward) instead of --- (straight forward).

I will try to make it work for the next update.

Thanks for your input. :)

Edit:

After extensive tests and studies, I have come to the conclusion that I am an idiot. :D

I have achieved making recycled projectiles face the correct direction immediately, and I am now working on a way to implement it in .modifyTargeting().

The easiest way to make it work, would be for it to take different arguments, such as: [ljass]modifyTargeting(distance,angle)[/ljass] where distance is the distance from the projectiles current coordinates and angle is pretty obvious. That would be instead of the current [ljass]modifyTargeting(xPos,yPos,zPos)[/ljass].

Thoughts anyone?
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
That would be good for making projectiles that turn.
 

Kenny

Back for now.
Reaction score
202
I am going to have to think hard about implementing [ljass]SetUnitLookAt()[/ljass] into the system.

Once you use [ljass]SetUnitLookAt()[/ljass] on a dummy unit, [ljass]SetUnitFacing()[/ljass] is just useless.

That makes things far more complex for homing missiles, as the system lets users add a target if they want, which means I might need an overhaul to that part of the interface..

Maybe some sort of [ljass]enableHoming(whichTarget)[/ljass] method or some type of method operator..

Basically if the system uses [ljass]SetUnitLookAt()[/ljass] at all, it cannot use [ljass]SetUnitFacing()[/ljass], otherwise you will run into graphics bugs.

Waiting for peoples opinions before I go any further with this.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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