Variable offset

Started by DNZRX768, November 02, 2009, 11:24:21 PM

Previous topic - Next topic

DNZRX768

Is there a way to make the offset variable change overtime?

I would like to make a move that creates a line of pillars like a shockwave.

Something like Homer Simpson's Candybomb Super.
Hug the Pikachus!

Hug A Pikachu Today!

Byakko

I don't get it. Offset variable ? What offset, what variable ?
Yes you can create a move that sends several pillars of explosion where each pillar is created a bit further than the previous one.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

DNZRX768

Quote from: Byakko on November 02, 2009, 11:25:31 PM
I don't get it. Offset variable ? What offset, what variable ?
Yes you can create a move that sends several pillars of explosion where each pillar is created a bit further than the previous one.


offset= (0 + (random%320)), ceil(pos y-screenpos y)-80


This offset!

I Wonder if it is possible to make the X part a function of time or something...

And you said that each pillar can be created a bit further down than the last one.

Does this method involve the offset or something else?
Hug the Pikachus!

Hug A Pikachu Today!

Byakko

I'll assume you're talking about a projectile (yeah believe it or not it helps when you explain what in the blue hell you're talking about... SAY IT, dude, don't expect people to magically see what the flying flip is in your head)
When you create a projectile, offset is a parameter you can use. This offset is taken into account when the projectile is created - and only at that instant.
If you want to create several projectiles, you can use the same projectile controller and simply have it trigger several times - by using several triggers.
So then, you can simply give the offset a value that depends on when it is created.

Example :
type = Projectile
trigger1 = Time = 5
trigger2 = Time = 10
trigger3 = Time = 15
trigger4 = time = 20
...
offset = 25 + 5*Time, 0

Look at the offset line. 25 + 5*Time.
When Time = 5, that is, on the first projectile created, the result of that expression is 25+5*5 = 50. Then, when Time = 10, on the second projectile created (when the second Trigger is activated), it will be 25+5*10 = 75. Et caetera.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.