I'm a newb at script

Talk about making games.

I'm a newb at script

Postby Donutslayer » Sat Jun 21, 2008 6:23 am

I've used other programs, but when it comes to game editor I'm a newb, I would like to know some script editor commands like gravity, all I know in the script editor is how to move left and right. I need to know how to make a command wait until the first part happens (y = y + 5 wait 1 second y = y - 5) doesn't work


please help
Donutslayer
 
Posts: 4
Joined: Fri Jun 20, 2008 1:35 am
Score: 0 Give a positive score

Re: I'm a newb at script

Postby asmodeus » Sat Jun 21, 2008 10:52 am

You can get some information about the Game-Edito scripting here.
User avatar
asmodeus
 
Posts: 483
Joined: Thu Oct 11, 2007 5:04 pm
Location: Germany
Score: 43 Give a positive score

Re: I'm a newb at script

Postby Freddy » Sat Jun 21, 2008 3:42 pm

Oh, do you want to know how to jump, and then fall back down?
That's simple, here's what ya do: Go to keydown (choose the key you want/make sure you set the reapeat to disable) -> add action, script editor:

yvelocity = yvelocity - 8;

We now have the ability to jump.
Then add an event -> draw actor ->script editor:

yvelocity = yvelocity + .8;

We now have gravity to pull us back down.
All that is left to do is add ground. Make another actor called ground. Give it an animation, maybe just a line made from ms paint. When you are done, go to the "jumping" actor. Add an event -> collision -> physical response, On: any side, Of Actor: ground, Repeat this event while actor is colliding: yes -> edit action, leave everything as is EXCEPT the first number under Final Velocity Multiplyer. Change that number to zero. Click OK, immediate action. Go to game-mode, and try it out.
I hope I answered your question. :D
Hola
User avatar
Freddy
 
Posts: 548
Joined: Sat Jun 02, 2007 3:42 pm
Location: Why do you want to know?
Score: 14 Give a positive score

Re: I'm a newb at script

Postby Donutslayer » Sun Jun 22, 2008 12:32 am

thanks, I think I've figured it out, but can't you really just put y = y - 8 instead of yvelocity
Donutslayer
 
Posts: 4
Joined: Fri Jun 20, 2008 1:35 am
Score: 0 Give a positive score

Re: I'm a newb at script

Postby DST » Sun Jun 22, 2008 12:35 am

in fact, you can just put y+=8; instead of either of those.

However, if you're making gravity, you'd probably want to use yvelocity, since you go faster and faster as you fall.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: I'm a newb at script

Postby Donutslayer » Sun Jun 22, 2008 10:11 pm

thanks for all the help but I mostly want to know how to make something wait

WAIT ONE SECOND
then
explode animation 1
WAIT ONE SECOND HOW DO I MAKE SOMETHING WAIT!!!!!!!!!!!!!!!!!!!!!!!
then
change animation {explode animation 2}
Donutslayer
 
Posts: 4
Joined: Fri Jun 20, 2008 1:35 am
Score: 0 Give a positive score

Re: I'm a newb at script

Postby DST » Sun Jun 22, 2008 10:27 pm

use a timer!
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: I'm a newb at script

Postby Freddy » Sun Jun 22, 2008 10:37 pm

Lol, OK:

1. Go to the actor, add event "draw actor" -> create timer. Click on the "timer" button, and select ''new timer". Name the timer, give it a time (it's in milliseconds, so make sure that you do 2000 for 2 seconds). Click OK.
2. Add the event called "timer" located at the bottom of the events list. Click the timer button, and select your timer. Add action -> change animation. Choose your explosion animation, click add -> immediate action.
3. Add event -> animation finish, (the explosion animation) -> change animation, (to whatever your next animation is)
You're done! :D
Hola
User avatar
Freddy
 
Posts: 548
Joined: Sat Jun 02, 2007 3:42 pm
Location: Why do you want to know?
Score: 14 Give a positive score

Re: I'm a newb at script

Postby Donutslayer » Sun Jun 22, 2008 11:11 pm

THANK YOU, DST, FREDDY, AND ASMODUES









THANK-YOU!!!!!!!!!!!!!!11
Donutslayer
 
Posts: 4
Joined: Fri Jun 20, 2008 1:35 am
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest