[RMVX] BIRDS FLYING ACROSS A SCREEN.
Posts
Pages:
1
I am just wondering what is the best way to get birds to fly across the screen, but teleport back somewhere else and repeat the movement?
The logic is pretty simple...
Create a "Bird" event (I used position 0,3 on a standard 17x13 map)
Set the Graphic
Set the Autonomous Movement. (I used Custom, Move Right, Repeat Action)
I also bumped up the speed & Freq. to 5 (I hate to wait)
Set Options: Through
Set Prioroty: Above Characters
Set Trigger: Parallel Process
Event Commands:
The biggest problem is if the player can see the edge of the map, the bird just 'blips out' then 'blips back in'. There is no way to make it look like it flies off-screen at the edge of the map.
The only way I can think of to prevent this is to create a 'margin' of unpassable tiles around the edge of the map (9 extra tiles right & left, 7 extra tiles top & bottom) so there is always 1 tile that the player can never see.
Create a "Bird" event (I used position 0,3 on a standard 17x13 map)
Set the Graphic
Set the Autonomous Movement. (I used Custom, Move Right, Repeat Action)
I also bumped up the speed & Freq. to 5 (I hate to wait)
Set Options: Through
Set Prioroty: Above Characters
Set Trigger: Parallel Process
Event Commands:
@>Control Variables: [0001] = This event's Map X
@>Conditional Branch: Variable [0001] == 16 (right edge of map)
@>Set Event Location: This event, (000,003)
: Branch End
The biggest problem is if the player can see the edge of the map, the bird just 'blips out' then 'blips back in'. There is no way to make it look like it flies off-screen at the edge of the map.
The only way I can think of to prevent this is to create a 'margin' of unpassable tiles around the edge of the map (9 extra tiles right & left, 7 extra tiles top & bottom) so there is always 1 tile that the player can never see.
I imagine using a picture would be easier, that way you can have it fly off screen.
Just create a few picture images, for each step of animation. Lets call them Bird1, Bird2, Bird3, Bird4.
create an event that initializes all the birds:
on page 2, have a logic event that controls them:
And then just make sure there is some logic at the end that moves them back to their starting position when they pass the edge of the screen a certain amount.
(obviously you'll need to tweak numbers and crap as I am just writing this here and making numbers up as I go)
Just create a few picture images, for each step of animation. Lets call them Bird1, Bird2, Bird3, Bird4.
create an event that initializes all the birds:
Variable [0001: Animation Frames] = 0
Variable [0002: First Bird X] = whatever
Variable [0003: First Bird Y] = whatever
Variable [0004: Second Bird X] = whatever
Variable [0005: Second Bird Y] = whatever
Variable [0006: First Bird Frame] = 1
Variable [0007: Second Bird Frame] = 3
Show Picture 1: Bird1 @ X:Variable 0001, Y:Variable 0002
Show Picture 2: Bird3 @ X:Variable 0003, Y:Variable 0004
Set Self Switch A: True
on page 2, have a logic event that controls them:
0001 += 1
0002 -= 2
0003 -= 1
0004 += 5
0005 += 2
Move Picture 1: X:0002, Y:0003 @ 5 Frames
Move Picture 2: X:0003, Y:0004 @ 5 Frames
Wait 5 Frames
If 0001 >= 4
If 0006 == 1
0006 = 2
Show Picture 1: Bird2, X:0002, Y:0003
else
if 0006 == 2
0006 = 3
Show Picture 1: Bird3, X:0002, Y:0003
else
if 0006 == 3
0006 = 4
Show Picture 1: Bird4, X:0002, Y:0003
else
if 0006 == 4
0006 = 1
Show Picture 1: Bird1, X:0002, Y:0003
end
end
end
end
[..Same logic as above for Picture 2..]
end
And then just make sure there is some logic at the end that moves them back to their starting position when they pass the edge of the screen a certain amount.
(obviously you'll need to tweak numbers and crap as I am just writing this here and making numbers up as I go)
If your map isn't too big, what I would do is just set a move route:
Move right
Move right
Move right
Move right
(many times)
Change graphic (to something completely transparent).
Move left
Move left
(many times again)
Change graphic (back to bird).
Repeat Pattern check
Ignore Impossible moves check
Move right
Move right
Move right
Move right
(many times)
Change graphic (to something completely transparent).
Move left
Move left
(many times again)
Change graphic (back to bird).
Repeat Pattern check
Ignore Impossible moves check
The problem with that is:
The biggest problem is if the player can see the edge of the map, the bird just 'blips out' then 'blips back in'. There is no way to make it look like it flies off-screen at the edge of the map.
The only way I can think of to prevent this is to create a 'margin' of unpassable tiles around the edge of the map (9 extra tiles right & left, 7 extra tiles top & bottom) so there is always 1 tile that the player can never see.
I am going to try the method above. Hopefully I can get it to work. >_<
Well, I don't think this blip looks that ugly.
You can prevent it by using this tile margins, or by using pictures for the birds, instead of charsets.
OR
Since you're using VX, which allows any size for charsets... You could make a really wide charset, and place the bird on the edge of the char. This way, when the event touches the border of the map, the bird will have surpassed the edge, without the blip thing.
You can prevent it by using this tile margins, or by using pictures for the birds, instead of charsets.
OR
Since you're using VX, which allows any size for charsets... You could make a really wide charset, and place the bird on the edge of the char. This way, when the event touches the border of the map, the bird will have surpassed the edge, without the blip thing.
author=prexus
ignoring my post ;_;
Oh! I actually missed it, haha. I am looking into it, but I am a bit confused.
Hm. One thing with the self-switch is, how would it reactivate if I wanted to go on the world map again?
Really, I still think my way is much easier. You wouldn't have to use any switches, not even self-switches. And because of that, you could just copy-paste as many birds as you want on the screen.
Pages:
1