frd I'm thinking that because the dragonfly moves randomly that it's not possible to make another actor follow it using constrains..
It should not be a problem, since the dragonfly is constantly updating it's Y position to the game.dragonfly Y. No matter how random the movement is.
Try putting two display text behaviors on the dragonfly. One to show the dragonflys self.position Y and one to show game.dragonfly Y. They should match.
@monkeyboy simian, I've updated my demo for you to include Y movement. You can now move the green block freely and the fire still follows it as expected. I hope this helps out.
I've been losing my mind over this (again).. Thanks for your help (again)... I'll have a bit of a play now – but don't have much time. Alas, my day is pretty much over (am in Australia)
@jamie_c We're always out of sync with the rest of the world down here. Not too helpful. That demo is perfect but do you think it will be possible to apply it to the way I'm spawning my dragonfly?
Sure, it should be. It shouldn't matter how something is spawned or the exact behaviors used for the movement. The fire is constrained to the characters X and Y locations so it should stay constrained to any kind of movement. I'm not sure what your exact behaviors are but if you have any problems let me know.
This might seem a bit extreme – but I've grabbed everything that makes the dragonfly move and photoshopped them together.
I'm still getting the same problem. I just don't get it. I have two game level attributes for x and y. I've got the constrains as you can see in the dragonfly. I've got the exact same rules as you in my fire. Yet I'm still getting the same issue as depicted in my previous grab which shows the fire not moving on the y axis.
Another thing I noticed is that in where the fire actor is spawned (right at the bottom) if I have it spawn relative to scene as you do, it doesn't appear at all.
I know that it's possible now – thanks to your demo. Something is obviously wrong at my end. But According to the rules in this (long) grab – shouldn't it be working?
I did that and the numbers are right where I would think they should be.. directly over the dragonfly.. so, if that's happening, why is the fire not following?
It seems like they are not matching, but the values are overlapping. Put an offset to one of the display text behaviors so you can clearly see them both.
Also, the fire is appearing at the correct y, but not following it. However you need to destroy the fire once the dragonfly has left the screen. The reason there are more fires each time the dragonfly appears is that the previous ones are still there.
There has to be errors somewhere in your code but its just a guessing game for people who don't have your files. You've posted some screens above, but they don't tell the whole story. What do the rules in the fire actor look like?
Also in the rules you did post, I see TWO competing Move Behaviors. I'm sure it's not causing your problem, but they seem to conflict with each other in the rules you have posted so you might want to check that out.
But this type of error could easily be what is causing your problem, one missed behavior or one transposed number somewhere could be causing your problem. Comb through your behaviors slowly and deliberately to find the error(s). Also you might consider starting a new basic project to just figure out this issue, and once you get the fire working in the basic file, transpose those behaviors to your current file.
What is the last screenshot showing the y values of?
My best guess is that the constrains are muddled somewhere down the chain. Your video shows the flame x is constrained to the dragonfly y. It should be the flames' y constrained to the dragonfly y. This must be the case as it is moving across the screen in time with the dragonflys' up and down movement. This should mean one of your constrains is incorrect - the dragonfly, the flame, or the game.attribute. Because of this, the flame is spawning at the correct y position but then jumping to the middle of the screen as it incorrectly follows the y movement of the dragonfly except on its' x axis.
A final guess is that the y position of the flame is unable to change because it has been constrained to something else or is not constrained to anything. In the spawner the flames' position should be relative to actor.
I can't see anything else in the information you've posted. You could upload the file somewhere and let us take a look.
Comments
@frd here's how the dragonfly spawns
@frd I'm thinking that because the dragonfly moves randomly that it's not possible to make another actor follow it using constrains..
@monkeyboy simian said:
It should not be a problem, since the dragonfly is constantly updating it's Y position to the game.dragonfly Y. No matter how random the movement is.
Try putting two display text behaviors on the dragonfly. One to show the dragonflys self.position Y and one to show game.dragonfly Y. They should match.
Mental Donkey Games
Website - Facebook - Twitter
Is this what you're looking for?
https://www.dropbox.com/sh/gylrcaghbmtft08/AADYRzbkpjxSmm3_RbY__yE7a?dl=0
@monkeyboy simian, I've updated my demo for you to include Y movement. You can now move the green block freely and the fire still follows it as expected. I hope this helps out.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@frd GS won't open the file..?
@jamie_c Thanks..
I've been losing my mind over this (again).. Thanks for your help (again)... I'll have a bit of a play now – but don't have much time. Alas, my day is pretty much over (am in Australia)
@monkeyboy simian, Yeah. USA here so we are on different schedules!
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c We're always out of sync with the rest of the world down here. Not too helpful. That demo is perfect but do you think it will be possible to apply it to the way I'm spawning my dragonfly?
Sure, it should be. It shouldn't matter how something is spawned or the exact behaviors used for the movement. The fire is constrained to the characters X and Y locations so it should stay constrained to any kind of movement. I'm not sure what your exact behaviors are but if you have any problems let me know.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Thanks @jamie_c
This might seem a bit extreme – but I've grabbed everything that makes the dragonfly move and photoshopped them together.
I'm still getting the same problem. I just don't get it. I have two game level attributes for x and y. I've got the constrains as you can see in the dragonfly. I've got the exact same rules as you in my fire. Yet I'm still getting the same issue as depicted in my previous grab which shows the fire not moving on the y axis.
Another thing I noticed is that in where the fire actor is spawned (right at the bottom) if I have it spawn relative to scene as you do, it doesn't appear at all.
I know that it's possible now – thanks to your demo. Something is obviously wrong at my end. But According to the rules in this (long) grab – shouldn't it be working?
Did you try what @NipaDidIt suggested? This would let you know whether the dragonfly is updating its' y correctly.
No @frd .. I guess I got caught up with what I was doing.. I'll have a go now.. I've just uploaded a video showing the gameplay
@frd
I did that and the numbers are right where I would think they should be.. directly over the dragonfly.. so, if that's happening, why is the fire not following?
Screen grab below
ahhhhhhhhhhhhhhhhh
I tried the same thing on the fire actor..
It looks like the x and y are the wrong way round.
The movement the fire does sideways is what it is supposed to be doing vertically isn't it?
With the text displayed you want to see if the dragonfly x and y and the game.attributes you set up to follow them match.
It seems like they are not matching, but the values are overlapping. Put an offset to one of the display text behaviors so you can clearly see them both.
Mental Donkey Games
Website - Facebook - Twitter
It looks like the flames' x is constrained to the dragonflys' y, and that the flames' y is not changing in response to anything.
Also, the fire is appearing at the correct y, but not following it. However you need to destroy the fire once the dragonfly has left the screen. The reason there are more fires each time the dragonfly appears is that the previous ones are still there.
ok.. on it now
Y offset -100
@frd Not sure how the dragonfly can cause the fire actor to be destroyed..
Surely with all the grabs and video - someone can help me here?? I'm losing my banana!
If you want to zip it up and send me a copy (via PM) I will take a look at it. Otherwise its just guessing.
There has to be errors somewhere in your code but its just a guessing game for people who don't have your files. You've posted some screens above, but they don't tell the whole story. What do the rules in the fire actor look like?
Also in the rules you did post, I see TWO competing Move Behaviors. I'm sure it's not causing your problem, but they seem to conflict with each other in the rules you have posted so you might want to check that out.
But this type of error could easily be what is causing your problem, one missed behavior or one transposed number somewhere could be causing your problem. Comb through your behaviors slowly and deliberately to find the error(s). Also you might consider starting a new basic project to just figure out this issue, and once you get the fire working in the basic file, transpose those behaviors to your current file.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
What is the last screenshot showing the y values of?
My best guess is that the constrains are muddled somewhere down the chain. Your video shows the flame x is constrained to the dragonfly y. It should be the flames' y constrained to the dragonfly y. This must be the case as it is moving across the screen in time with the dragonflys' up and down movement. This should mean one of your constrains is incorrect - the dragonfly, the flame, or the game.attribute. Because of this, the flame is spawning at the correct y position but then jumping to the middle of the screen as it incorrectly follows the y movement of the dragonfly except on its' x axis.
A final guess is that the y position of the flame is unable to change because it has been constrained to something else or is not constrained to anything. In the spawner the flames' position should be relative to actor.
I can't see anything else in the information you've posted. You could upload the file somewhere and let us take a look.