-
Extreme Snowboarder!
I've started making a snowboarding game and yes you guessed it, I've got a few problems. Okay, I want the jump to be behind the snowboarder if he is in front of it and if the snowboarder goes behind it, the jump will be in front. Thanks in advance!
-Dakid928
P.S. If I didn't explain it that well, let me know.
-
Senior Member
The jump? As the hill or something?
You can change depth (thats what its called if object is in front of or behind other object) using command
this.swapDepth(number);
But it works best only if you attach/duplicate the objects on screen and dont draw them directly.
As I dont know more about how have you built the game, you might want to explain better. How are you placing hero and "jumps" on stage? Do you want same "jump" to be sometimes in front of hero and sometimes behind it or do you have many "jumps", some in front of and some behind it.
-
Thanx a heep man !
-Dakid928.
-
As I dont know more about how have you built the game, you might want to explain better. How are you placing hero and "jumps" on stage? Do you want same "jump" to be sometimes in front of hero and sometimes behind it or do you have many "jumps", some in front of and some behind it. [/QUOTE] [/B]
The way I set it up, is the little man is on a hill. The little man is in the upper left hand side of the hill. jumps randomly come in diferent places.
-
Senior Member
umm, no, Im still not able to picture it. Is it side view? Top down? Perhaps you could show swf or picture of it.
If the jumps come in different places, then I think you are able to put hero on dapth 100 for example and jumps that should be in front of him would go to depths 101...200. Jumps behind him would go on depths 1...99.
-
How do I put pictures in here?
-
Illuminatus!
Originally posted by tonypa
But it works best only if you attach/duplicate the objects on screen and dont draw them directly.
I will challenge that thought. swapdepth works either way.
Just make sure to not duplicate your objects in a same level as another object - it will cause the preceding movie clip to disappear.
-
leight.com.au
just attach the .jpg, .png, .bmp, .jpeg when you post. and then when you click on the attachment it will show.
if you want it in your post, u gota have it on the net so you can go like this
code:
i needed to write it in as or something coz otherwise it would make that a link.
hope it helps
-
Thanx guys!
-
Senior Member
Originally posted by fospher.com
I will challenge that thought. swapdepth works either way.
Just make sure to not duplicate your objects in a same level as another object - it will cause the preceding movie clip to disappear.
Try this:
make 2 frames and 2 layers.
in layer 1 frame 2 place action
gotoAndPlay (1);
in layer 2 make 1 keyframe that lasts over both frame.
draw mc in layer 2. Give it instance name "mc".
place action on mc:
onClipEvent (load) {
this.swapDepths(1);
}
How many movie clips is on stage when you run it? And tell me it works like expected.
-
Hype over content...
Yeah, swapDepths with authortime content generates that nasty, nasty bug.
When I first "discovered" that I just couldn't find any info on it. MM count it as a "feature" and not a bug, so theres not even a white paper about it ( Or wasn't when I was pulling my hair out about it ).
Squize.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|