Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/19/24 18:45
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, 7th_zorro, TedMar, Ayumi, kzhao), 756 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
need advise for implementing this in my car game #360987
02/28/11 14:23
02/28/11 14:23
Joined: Aug 2008
Posts: 81
J
jpxtreme Offline OP
Junior Member
jpxtreme  Offline OP
Junior Member
J

Joined: Aug 2008
Posts: 81
Hello. I'm making a car driving simulation game. I just would like to ask for an advise or idea. How do I know if the player is driving the wrong road? If it is, then it will cause the player a violation.

Please give me an idea or way how to achieve this. I've tried to use events but I don't know the logic to do this.

Re: need advise for implementing this in my car game [Re: jpxtreme] #361053
02/28/11 20:12
02/28/11 20:12
Joined: Jan 2010
Posts: 150
iran - tehran
F
flatron Offline
Member
flatron  Offline
Member
F

Joined: Jan 2010
Posts: 150
iran - tehran
you can have a path along road and in a while check angle between car and next node in path.

Re: need advise for implementing this in my car game [Re: flatron] #361070
02/28/11 21:20
02/28/11 21:20
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
i'm not sure but i think you could also store the direction of each road in a skill, maybe an angle, like:

my.DriveDirection = 0

then when the player vehicle is driving on it, you could do something like:

if(playerVehicle.pan>my.DriveDirection+20 || playerVehicle.pan<my.DriveDirection-20)
error("YOUR DRIVING THE WRONG DIRECTION");

just an idea.. idk if it helps


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1