Page 1 of 1
Noob needs help
Posted:
Sun Feb 03, 2008 12:18 am
by Devil Metal Knight
Okay I started on this a while ago and know some things. But I want to know this....
How do I make it so when I pick someone like Mario in a character selection and then it shows a picture about him. After that I pick a level and when it starts i'm Mario. Then when it's done and I want to play as Luigi and pick a level and when I start I'm luigi. How do I do this?
Re: Noob needs help
Posted:
Sun Feb 03, 2008 8:08 am
by Thanx
Here, I made a little sample program. Study the scripts and you'll understand. If you have any questions, just ask. Oh, and there's one problem you might have: I made it in version 1.3.9 So, this might not be compatible with you Game Editor...
Worth a try...
Re: Noob needs help
Posted:
Sun Feb 03, 2008 2:18 pm
by Devil Metal Knight
ya I tried an it doesn't work... Could you just post the script? Or something like that?
Please and Thank you
Re: Noob needs help
Posted:
Sun Feb 03, 2008 2:20 pm
by Bee-Ant
Very simple...but first, do you know how to add user variable?
Re: Noob needs help
Posted:
Sun Feb 03, 2008 2:29 pm
by Devil Metal Knight
No I don't how?
Re: Noob needs help
Posted:
Sun Feb 03, 2008 2:38 pm
by Bee-Ant
Ummm...you need to know it first...
No mean to tease you...but, this will need a lot of variables
Re: Noob needs help
Posted:
Sun Feb 03, 2008 2:42 pm
by Devil Metal Knight
woops! I found it out.... But I did use them before. So I do know how. I just forgot what they were.
sorry
Re: Noob needs help
Posted:
Sun Feb 03, 2008 2:52 pm
by Bee-Ant
I'll make a demo tomorow...I'm really tired...
Re: Noob needs help
Posted:
Mon Feb 04, 2008 10:16 am
by Thanx
You don't need many variables. On onclick just use change animation. If the animation for that picture is Mario, then change animation-> Mario animations. No need for variables, just check for the type of animations used earlier.
Do you understand? I could detail.
Re: Noob needs help
Posted:
Mon Feb 04, 2008 10:24 am
by Bee-Ant
But how about Changing Animation of an actor which you control?
It need variable...
Re: Noob needs help
Posted:
Mon Feb 04, 2008 4:45 pm
by Thanx
Devil Metal Knight said that there would be a picture that shows the chosen character. With an if statement it can be solved.
An actor with animations have a property called animindex.
If you've got two animations, the 1.st is Mario, the 2nd is Luigi, then for Mario the animindex is 0; for Luigi it's 1;
In Key-down event add if statement
if animindex == 0
Use mario anim
if animindex ==1
Use Luigi anim
No need to understand variables. But they are usefull! Should know them, and I have no objection on doing it with variables, but it can be done other ways... If that's your weak-point.
Re: Noob needs help
Posted:
Mon Feb 04, 2008 10:43 pm
by DilloDude
Thanx wrote:if animindex == 0
Use mario anim
if animindex ==1
For the second one, you'd want to use an else if, so you don't need to check again if the first was true... or even better, use a switch.