System Projectile

Kenny

Back for now.
Reaction score
202
A bit more of an explanation:

  • ProjVisions: I think I have explained this in enough detail. Basically you call [ljass]proj.attachVision(600.00,true)[/ljass] for a projectile and that's it. The 600.00 refers to the vision radius, while the boolean parameter refers to whether you want the vision to linger after the projectile is destroyed (or if you remove vision via the detach method). Lingering vision lasts for 3.34 seconds (like many abilities from DotA and stuff).
  • ProjClasses: I think people are thinking to far into this. This module will basically only give a projectile struct 3 more members to play with (two string members and one integer member), they are:
    • [ljass]Instance.class[/ljass]: A string member that can be used abstractly in many different situations. For example: One may set it to "Fire" for one projectile and "Water" for another, giving each projectile an elemental classification that can be checked in grouping functions.
    • [ljass]Instance.label[/ljass]: A string member that can be set to a more specific classification of a projectile. For example, one can set [ljass].class[/ljass] to "Fire", but also set [ljass].label[/ljass] to "Fireblast", basically giving the projectile a name (often the name of the spell it comes from).
    • [ljass]Instance.power[/ljass]: The integer member that can be set to one of 6 predefined integers that determine the power level of a projectile (allowing stronger projectiles to destroy weaker ones and so on), they include:
      • [ljass]PROJECTILE_POWER_NONE[/ljass]
      • [ljass]PROJECTILE_POWER_VERY_WEAK[/ljass]
      • [ljass]PROJECTILE_POWER_WEAK[/ljass]
      • [ljass]PROJECTILE_POWER_MODERATE[/ljass]
      • [ljass]PROJECTILE_POWER_STRONG[/ljass]
      • [ljass]PROJECTILE_POWER_VERY_STRONG[/ljass]
  • ProjEffects: This module has not been completed yet, but it will include one extra effect attachment for a projectile (I think more than that is overkill, but two can be necessary). It will also include "flash" methods that can be used to quickly display (i.e. create then destroy) an effect at the current coordinates of a projectile. I might also add an [ljass]AddSpecialEffectZ()[/ljass] function to it, as it allows for much more accurate effect placement when projectiles are in mid-air.

----------------------------------------------------------------------------

@ Laiev:

ProjClasses is a very simple module because this type of thing changes from map to map. The module basically allows you to classify and individualise different projectiles without the need to use the [ljass]proj.attachData()[/ljass] method (to save it for something more important).

As it is only adding new members to the struct, it should be completely compatible with projgroups. You could use something like:

JASS:
function ForNearbyFunc takes nothing returns nothing
    if EnumProjectile.class == "Fire" then // Could also use: GetProjectileClass()
        call EnumProjectile.terminate()
    else
        // Do cool stuff here.
    endif
endfunction

// In some other function:
call GlobalProjGroup.forNearby(x,y,z,radius,data,ForNearbyFunc)

// Users can even develop a library full of constant globals that represent class types:
library ProjectileClassification

    // Classes:
    globals
        constant string PROJ_CLASS_FIRE = "Fire"
        constant string PROJ_CLASS_WATER = "Water"
        constant string PROJ_CLASS_EARTH = "Earth"
        constant string PROJ_CLASS_AIR = "Air"
    endglobals

    // Labels are more like individual names for projectiles to really individualise them (in case one spell specifically counters another).
    // But they can also be used for whatever the user wants.
endlibrary


@ BlackRose:

Don't go crazy yet, I don't think it is as cool as you wanted it to be, I got too tired. But it is new, and new things are inherently awesome.
 

Kenny

Back for now.
Reaction score
202
Bump.

Still looking for feedback on the above features.

I am getting pretty close to releasing the next version (v1.0.0), all that's needed is some new documentation and a couple hundred more tests and stuff.

ProjEffects now includes:

  • Methods to attach and detach an extra effect ([ljass]this.attachEffect[/ljass] and [ljass]this.detachEffect[/ljass]).
  • Methods to flash the death animation of an effect attached to a projectile or at a projectiles coordinates ([ljass]this.flashProj[/ljass] and [ljass]this.flashPoint[/ljass]).
  • Methods to project the trajectory of a projectile and create an AoE indicator using multiple effects ([ljass]this.displayTrajectory[/ljass] and [ljass]this.displayEffectArea[/ljass]), just for fun.
  • Boolean to check if a projectile has an extra effect attached and string that returns the model path of the extra effect ([ljass]this.hasEffect[/ljass] and [ljass]this.effectStr[/ljass]).
  • An [ljass]AddSpecialEffectZ[/ljass] function to more accurately create effects at the positions of projectiles.
 

Kenny

Back for now.
Reaction score
202
I think he means making the projectile invisible to (a) enemies of the owning player of the projectile, or (b) to all other players except the owning player of the projectile.

(a) Would require adding permanent invisibility to a projectile.
(b) Would require some tricky use of [ljass]GetLocalPlayer()[/ljass], which I don't want to do.

@ Laiev:

Is there anything you think the ProjClasses module should do that hasn't already been explained?
 

Laiev

Hey Listen!!
Reaction score
188
The missile sfx can be set'ed to "" if LocalPlayer (while setting the projectile), don't?

@Kenny

This:

PROJECTILE_POWER_NONE
PROJECTILE_POWER_VERY_WEAK
PROJECTILE_POWER_WEAK
PROJECTILE_POWER_MODERATE
PROJECTILE_POWER_STRONG
PROJECTILE_POWER_VERY_STRONG

Will be something 'global' right, I mean... while setting the projectile things, we can set they power too and then use it when we want? If so, I think its perfect right now.


EDIT: Ah.. I remember right now something (not a bug actually but is strange). If you set recycle to true, everytime (after the limit) you change the angle of the old missile, the missile start launching in wrong angle..

Example:

A = Unit Source
B = Unit Target
- = Missile
> = Angle of Missile 'Head'

Code:
A           -> B
B           -> A
B         <-   A

In my map, testing with Nasha, the glaive has a trail, so everytime the limit of missile reach, it will get the first glaive launched and will move to Nasha and then start the new launch, it create a giant trail between the death of first missile and new position of Nasha.
 

Kenny

Back for now.
Reaction score
202
Yeah using [ljass]GetLocalPlayer()[/ljass] isn't hard, I just didn't really want to do it, but it wouldn't take long. :) And yeah, you can basically set the model file string to "" for all players but the local player.

As for the power thing: Yes they will be globals that can be accessed at any time, you basically do this:

JASS:
// When setting up a projectile:

set p = projectile.create(...)
// etc.

set p.power = PROJECTILE_POWER_STRONG // &lt;--- Set the power here, then it can be accessed whenever you need it to be.
 

Laiev

Hey Listen!!
Reaction score
188
Have you read my Edit? :p

May I ask if you change something in p.projectNormal? Because I'm trying to change the targetx/y but it always run more then should and only stop in map bounds.


EDIT:

nvm... You just add the allowExpiration and I don't notice it :p
 

Kenny

Back for now.
Reaction score
202
Just read your edit. That is the only problem with recycling creeps. This system doesn't use [ljass]SetUnitLookAt()[/ljass], therefore, the projectiles that have previously been used in the system will be facing the same direction they were facing when they were destroyed.

Unfortunately the [ljass]SetUnitLookAt()[/ljass] method does not work well with homing and arcing projectiles, so I can't use it.

And yes you can just use the .allowExpiration member to make the projectile finish when it gets to the target location. You can also make the projectile target coordinates with a z height of 0.00, but that doesn't look as good.
 

Lmfaocj

Active Member
Reaction score
1
Omg thank you so much.
lol when i tested your demo map i was playing for about 30 minutes, it's so fun.
 

AgentChaos

New Member
Reaction score
1
PHP:
 method operator unitHitRadius= takes real value returns nothing
            if this.allowUnitCollisions then
                if this.unitTrig != null and this.uColl != value and value != 0.00 then
                    call TriggerClearConditions(this.unitTrig)
                    call DisableTrigger(this.unitTrig)
                    call DestroyTrigger(this.unitTrig)
                    set this.unitTrig = null
                endif
                if value != 0.00 and this.uColl != value then
                    set this.uColl    = value
                    set this.unitTrig = CreateTrigger()
                    call SaveInteger(StorageOne,GetHandleId(this.unitTrig),0,this)
                    call TriggerRegisterUnitInRange(this.unitTrig,this.dummy,this.uColl,null)
                    call TriggerAddCondition(this.unitTrig,thistype.unitFilt)
                endif
            endif
        endmethod
in your this code ,TriggerRegisterUnitInRange has a problem
if range >=500 and use AOE Damage not working well,and speed >=1200,AOE Damage unit also miss filter!!!
 

BlackRose

Forum User
Reaction score
239
The next version (if it comes T__T) checks for units differently, it no longer uses that TriggerRegisterUnitInRange nonsense. It uses GroupEnum functions, if I remember correctly. I've seen the next version :D
 

Red_drake

New Member
Reaction score
4
Hey, so im using this system in your map, and i came across a bug.

whenever i compress my map using Vexorian's optomizer, it no longer works. The map acts like maps with an unfixed Return Bug do.
Now, i dont think i have the most current version, but Im wondering if this is a known issue, or if its been fixed, or what?
 

Bribe

vJass errors are legion
Reaction score
67
Don't use "compress names" as it makes native declarations unusable as it STUPIDLY changes the name of the declared native.
 

jrhetf4xb

Member
Reaction score
12
I've also had problems with "Optimize script" so if the above doesn't work, try removing this one as well.
 

Red_drake

New Member
Reaction score
4
how much compression would i lose if i didnt "Compress Names"?
because im already tight on map space >.>

EDIT:
well, unchecking "Compress Names" worked. thanks :D
 

Bribe

vJass errors are legion
Reaction score
67
Using native WC3 skins instead of custom skins (imported files) clears up your map file size.

Using as little custom object editor data as possible also clears it up.
 

Buzzard

New Member
Reaction score
1
What units does [ljass]set this.allowUnitCollisions = true[/ljass] detect? It seems weird, I once made it hit nothing but the target of the projectile, and now it keeps hitting the caster.

Oh, and this thing is great.
 
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

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top