This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-02-27 11:34:46

jakeyboy132
New Scratcher
Registered: 2012-02-26
Posts: 1

*** How To Make A Car, So You Can Get In And Out?

im making a gta-like game... no violence, etc

Offline

 

#2 2012-02-27 11:46:00

Andres-Vander
Scratcher
Registered: 2010-09-16
Posts: 1000+

Re: *** How To Make A Car, So You Can Get In And Out?

Maybe when you touch the car and hold whatever to get inside, you make the character go behind the car and go to the car sprite until you press the button again


http://www.gifsoup.com/view1/2260823/flugelhorn-feline-o.gif

Offline

 

#3 2012-02-27 11:48:06

Stickman704
Scratcher
Registered: 2009-01-31
Posts: 1000+

Re: *** How To Make A Car, So You Can Get In And Out?

It's pretty difficult to make a GTA game without violence mate  big_smile

Anyway, I would use a variable called

(inCar?)
when gf clicked
forever if <<key [e v] pressed?> and <touching [car v]?>>
set [inCar? v] to [true] 

when gf clicked
forever if <<key [e v] pressed?> and <touching [car v]?> and <(inCar?) = [true]>>
set [inCar? v] to [false] 
Then do whatever you want when you're in the car (high speeds etc)

Last edited by Stickman704 (2012-02-27 11:49:44)


Dun dun dun dun dun dun.... dun dun dun dun dun dun...  tongue

Offline

 

#4 2012-02-28 19:01:47

SOScratch
Scratcher
Registered: 2010-02-01
Posts: 100+

Re: *** How To Make A Car, So You Can Get In And Out?

Stickman704 wrote:

It's pretty difficult to make a GTA game without violence mate  big_smile

Anyway, I would use a variable called

(inCar?)
when gf clicked
forever if <<key [e v] pressed?> and <touching [car v]?>>
set [inCar? v] to [true] 

when gf clicked
forever if <<key [e v] pressed?> and <touching [car v]?> and <(inCar?) = [true]>>
set [inCar? v] to [false] 
Then do whatever you want when you're in the car (high speeds etc)

I agree with what he said.
This is a good way to setup your script.


-SOScratch
Scratch On!

Offline

 

#5 2012-05-13 11:37:54

misterredstone
New Scratcher
Registered: 2012-05-13
Posts: 1

Re: *** How To Make A Car, So You Can Get In And Out?

Make a variable called incarorout
Like on a game on my other account  smile

Offline

 

#6 2012-05-13 13:51:18

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: *** How To Make A Car, So You Can Get In And Out?

A script that might make this work a little better so there's no overlapping of scripts would be:

when key [e v] pressed
if <touching [car v]?>
  set [car v] to (((car) + (1)) mod (2))
end
And then inside your player sprite, if the variable car = 0, he is outside the car...if car = 1, he is inside the car.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#7 2012-05-15 08:55:25

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: *** How To Make A Car, So You Can Get In And Out?

Stickman704 wrote:

It's pretty difficult to make a GTA game without violence mate  big_smile

Anyway, I would use a variable called

(inCar?)
when gf clicked
forever if <<key [e v] pressed?> and <touching [car v]?>>
set [inCar? v] to [true] 

when gf clicked
forever if <<<key [e v] pressed?> and <touching [car v]?>> and <(inCar?) = [true]>>
set [inCar? v] to [false] 
Then do whatever you want when you're in the car (high speeds etc)

Fixed  smile

Last edited by jontmy00 (2012-05-15 08:55:55)


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#8 2012-05-15 23:47:17

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: *** How To Make A Car, So You Can Get In And Out?

Or you could stamp all the stationary cars onto the background, then get the walking sprite to change to a car costume when the person is in the car  smile


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

Board footer