Problem When Moving Projectiles

wingdnosring

New Member
Reaction score
16
I've stumbled across an interesting problem. Here is what the applicable section of my trigger looks like:

Code:
                        Variable - Set CurrentBulletLocation = (Position of (Picked unit))
                        Variable - Set FutureBulletLocation = (CurrentBulletLocation offset by WeaponBulletSpeed[CurrentWeapon[BulletTravelLoop]] towards (Custom value 1 of (Picked unit)) degrees)
                        Unit - Move (Picked unit) instantly to FutureBulletLocation (Blend)

If the picked unit is a unit (I know that sounds confusing...just hang on) they move prefectly. But if they're a projectile, they only move in one direction and pool in the corner of the map. I've tried custom projectiles, default projectiles, they're all the same.

Is there some special way to trigger projectile movement? Or am I supposed to make a dummy unit of some sort in order to move a projectile with triggers? I would be just as happy making a dummy unit. So if anybody could walk me through that, I'd greatly appreciate it (I have barely touched the Data Editor so far).

If I can get this problem fixed, I'll have a full third-person shooter system ready to go!

[Edit]: Fixed the second problem. Anybody who saw it will definitely notice it's gone now. The one above is the only problem left (for now).
 
I've stumbled across an interesting problem. Here is what the applicable section of my trigger looks like:

Code:
                        Variable - Set CurrentBulletLocation = (Position of (Picked unit))
                        Variable - Set FutureBulletLocation = (CurrentBulletLocation offset by WeaponBulletSpeed[CurrentWeapon[BulletTravelLoop]] towards (Custom value 1 of (Picked unit)) degrees)
                        Unit - Move (Picked unit) instantly to FutureBulletLocation (Blend)

If the picked unit is a unit (I know that sounds confusing...just hang on) they move prefectly. But if they're a projectile, they only move in one direction and pool in the corner of the map. I've tried custom projectiles, default projectiles, they're all the same.

Is there some special way to trigger projectile movement? Or am I supposed to make a dummy unit of some sort in order to move a projectile with triggers?

On a similar note, I'm having trouble with another part of the same trigger. (Figured I would post both problems here to avoid flooding the forum).

Code:
        General - For each integer BulletTravelLoop from 1 to 14 with increment 1, do (Actions)
            Actions
                Unit Group - Pick each unit in BulletGroups[BulletTravelLoop] and do (Actions)
                    Actions
                        Variable - Set CurrentBulletLocation = (Position of (Picked unit))
                        Variable - Set FutureBulletLocation = (CurrentBulletLocation offset by WeaponBulletSpeed[CurrentWeapon[BulletTravelLoop]] towards (Custom value 1 of (Picked unit)) degrees)
                        Unit - Move (Picked unit) instantly to FutureBulletLocation (Blend)
                        [COLOR="Red"]Variable - Set BulletHitGroup = (Units in (Region(FutureBulletLocation, 0.25)) having alliance Enemy with player (Owner of (Picked unit)) matching Excluded: Missile, Dead, Hidden, with at most Any Amount)[/COLOR]                        General - If (Conditions) then do (Actions) else do (Actions)
                            If
                                Or
                                    Conditions
                                        (Number of Living units in BulletHitGroup) >= 1
                                        (Height of (Picked unit)) < 0.001
                            Then
                            Else
                Unit Group - Pick each unit in BulletHitGroup and do (Actions)
                    Actions
                        Unit - Set (Picked unit) Life to (((Picked unit) Life (Current)) - WeaponDamage[CurrentWeapon[BulletTravelLoop]])

The problem lies in the red area. For some reason, regardless of whether my bullet is based off of a unit or a projectile, it never seems to detect units within a reasonable range. I assume this is because I'm trying to set a unit group within another unit group, but I thought I'd ask just to be sure.

If I can get these problems fixed, I'll have a full third-person shooter system ready to go!

I guess thats what movers are for. Maybe.
But screw that why dont you just take the weapon's effect like everyone else? ^^
I mean youll make the unit attack at whatever is in the middle of your screen or whatever you select. Youd have to change the target filter at the weapon of the unit to unit/point though.
 
Two reasons:

1. I've delved into the trigger editor and found it to be smooth sailing. Enough is familiar here that I can do everything I could do in Warcraft and I've only had the editor for about a day. The data editor I've spent maybe an hour in and it's so unintuitive that I get lost really quickly. You'd have to explain your method to me.

2. The mouse is not necessarily in the center of the screen...at least, I don't think it is. I have it completely hidden. And more than that, alot of projectiles will be flying up into the air as well. ATM I have WASD for movement, mouse for aim, left click for shoot, right click for zooming, W + Right Click for Run, and a nearly perfect camera layout. As I said, I don't know enough about the data editor yet to do what you mentioned and even if I did, can it send projectiles upwards?

However, I appreciate you taking the time to post a suggestion. I would give what you said a shot if I knew how :(.

[Edit]: third reason. The layout I'm designing is for a very particular game I have in mind. Everything is set up for 50 weapons ATM, including bullet speed, dmg, ammo type, weapon type, auto vs bolt vs semi fire, etc; Can the weapon option you suggested be swapped out easily for up to 50 weapons?
 
Two reasons:

1. I've delved into the trigger editor and found it to be smooth sailing. Enough is familiar here that I can do everything I could do in Warcraft and I've only had the editor for about a day. The data editor I've spent maybe an hour in and it's so unintuitive that I get lost really quickly. You'd have to explain your method to me.

2. The mouse is not necessarily in the center of the screen...at least, I don't think it is. I have it completely hidden. And more than that, alot of projectiles will be flying up into the air as well. ATM I have WASD for movement, mouse for aim, left click for shoot, right click for zooming, W + Right Click for Run, and a nearly perfect camera layout. As I said, I don't know enough about the data editor yet to do what you mentioned and even if I did, can it send projectiles upwards?

However, I appreciate you taking the time to post a suggestion. I would give what you said a shot if I knew how :(.

[Edit]: third reason. The layout I'm designing is for a very particular game I have in mind. Everything is set up for 50 weapons ATM, including bullet speed, dmg, ammo type, weapon type, auto vs bolt vs semi fire, etc; Can the weapon option you suggested be swapped out easily for up to 50 weapons?

mmh ive just realized that youll probably have to use abilities instead... but thats ok i guess^^
Btw. when you're using
Code:
Camera - Lock Camera Mouse Relative Mode On/Off(1, On)
your cursor is indeed centered all the time.
there is this map from overload119: Finalstalkerdemo.zip

I guess explaining to you much about the data editor is nonsense... if youre starting from the scratch you should read tutorials. I cant teach you hours of trying stuff out ^^
tutorials (those helped me a lot)

BUT i guess the unit version of your map would work too. (dunno why missiles wont do the trick...) Just look up every effect and behavior that is attached to the stalker - attack unit. in the map ive linked and try to figure out how they work...
basically there is a searcher that trys to get a nearby target all the time... its pretty small so its like looking for the collision of the missile with another unit. And then the damage effect will do its work. Well changing actors is a little difficult and i cant really tell you how... you could aswell use another missile and duplicate every effect and behavior of the stalker missile and try to get the duplicates attached to the new missiles like their parents are with the one of the stalker. If you enable "show object explorer" on the left side of the data editor it wont be too hard.

i hope this helped you at all. sry for the block of language or any misunderstandings. English is not my native language :p
 
Thanks for your help. After hours (literally) of testing I have found the ONE option that messes up 'move instantly' actions. It's "Movement - Mover". It cannot be based on a projectile's mover, or else the units pool on the sides of the map. If you change it to a mover a unit might have, like ground for instance, it works fine :).
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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

      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