YesNoOk
avatar

Coding: Helper-type projectile priority vs Projectile-type projectile priority (Read 11254 times)

Started by Redash, March 15, 2018, 09:59:02 am
Share this topic:
Coding: Helper-type projectile priority vs Projectile-type projectile priority
New #1  March 15, 2018, 09:59:02 am
  • avatar
  • **
    • Singapore
Hi,

Can help me understand how to tie a Projectile-type projectile with a Helper type projectile?

The helper-type projectile with priority = 0, hit nullified a projectile-type projectile with projpriority = 999.

Both projectiles above has attr: persistent = 0

Need help here as i had trial and error for hours already and still no clue what is the problem area.
Last Edit: April 06, 2018, 10:18:38 am by Redash
Re: Coding: Helper-type projectile priority vs Projectile-type projectile priority
#2  March 15, 2018, 09:40:31 pm
  • *****
  • Shame on you!
    • USA

  • Online
I thought there was a whole thread about this. I'll try to find it.
But most people dont use projectiles for making projectiles. You almost always want a helper.

What you're asking kinda doesn't make sense. So what I think you're asking is how do you make a projectile go through another projectile.
Because if the priorities hit each other it goes back to
projhits =
to see if the projectile continues on. Change that to 2 or higher to see it in action. If the projectile can only hit 1 time, it can only hit 1 time.
Look up the priorities in the hitdef. The number doesn't really matter all that much in the grand scheme of things unless the hit type is something different.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Coding: Helper-type projectile priority vs Projectile-type projectile priority
#3  March 16, 2018, 12:44:42 pm
  • avatar
  • **
    • Singapore
Hi Odb718,

I do not wish to make a projectile go thru another projectile here.
 I am trying to "tie" the 2 different types of projectiles.
This is because i have coded a boomerang projectile recently.

Also i had already tried projhits > 1 for projectile-type projectile and hitonce = 1 for helper-type projectile but they dun align properly and sometimes even inconsistently... hence this post for advice >_<
Re: Coding: Helper-type projectile priority vs Projectile-type projectile priority
#4  March 16, 2018, 01:05:51 pm
  • *****
  • Shame on you!
    • USA

  • Online
  I am trying to "tie" the 2 different types of projectiles.
Apparently you've already done that...
The helper-type projectile with priority = 0, hit nullified a projectile-type projectile with projpriority = 999.
This is what a tie is. You're saying the 2 projectiles hit each other and canceled out.
I'm not sure of your desired end result.

When the two projectiles touch, what do you want to have happen? Explain it 3 different ways. You want both to stop, you want both to keep going but dont want it to hit anything else, what?
What is happening now and why dont you want it to be that way?
vVv Ryuko718 Updated 10/31/22 vVv
Re: Coding: Helper-type projectile priority vs Projectile-type projectile priority
#5  March 17, 2018, 07:25:02 am
  • avatar
  • **
    • Singapore
Thanks Odb718 to help me explain my issue better.

By "nullify" from what i learnt is meaning:
 When Projectile A nullify Projectile B, Projectile B is destroyed but Projectile A can still continue to exist and damage any enemy objects.

By "tie" from what i learnt is meaning:
When Projectile A tie with Projectile B, both are destroyed (like equalised).

What is happening now:
Projectile-type Projectile (A) was nullifed by the helper-type Projectile B (the boomerang) instead of getting a tie. I had tried adjusting the priorities other related atrributes but cannot get a consistent outcome. Numhit has to be 1 and hitonce  = 1 for both projectiles.

The result i would like to achieve:
Both projectiles tie with each other. (Both to stop)
This is because i have other different types of projectiles that can collide with the boomerang projectiles for other effects. But now i am facing issue with the supposingly easiest one: getting a "tie" outcome

Currently the boomerang projectile u had helped me to code, it can hurt both enemy and friendlies.
So i would like it to have another projectile i can throw to tie it with.
Re: Coding: Helper-type projectile priority vs Projectile-type projectile priority
#6  March 17, 2018, 09:18:24 pm
  • *****
  • Shame on you!
    • USA

  • Online
So you just need to do a destroyself or a changestate to kill it there when it hits.
You can do it in the hitdef or those two options.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Coding: Helper-type projectile priority vs Projectile-type projectile priority
#7  March 18, 2018, 07:40:29 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
In order for a helper to be destroyed by a normal projectile you need a hitoverride that is affected by projectile attr. Without that they are immune to the effects of a projectile itself. They also need to have the P hitflag or they won't be able to hit projectiles in tye first place


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Coding: Helper-type projectile priority vs Projectile-type projectile priority
#8  March 26, 2018, 09:02:26 am
  • avatar
  • **
    • Singapore
Hi all thanks. I manage to test code the above advice/suggestions, improvement had been made but still have issues trying to "tie" 2 projectile of different types.


And also:
Quote
most people dont use projectiles for making projectiles. You almost always want a helper.
Pls advice why helper-type projectile coding is better than projectile-type projectile coding?
And when should we use 1 over the other?

P.S: i google for the post on the 2 types of projectiles but seem.not able to find a detailed thread
Re: Coding: Helper-type projectile priority vs Projectile-type projectile priority
#9  March 26, 2018, 10:10:46 am
  • *****
  • Shame on you!
    • USA

  • Online
Well, depending on the actual projectile you'll want a couple extra things to happen. It's pretty rare that you only need a projectile to go off on a tangent. Some projectiles will leave trails, or kick up dust, or have extra FX with them. This is pretty easy to do with a helper with an explod.
Another major reason is this exact problem of trying to get the projectile to "tie".
All in all it's just a lot easier to work with, imho. If you only want your fireball to go one way with 1 type of speed, a projectile isn't bad. But that's about it. The helper just has "all" of the features of mugen. The projectile doesn't.
vVv Ryuko718 Updated 10/31/22 vVv