Jump to content


Exylex

Member Since 11 Jan 2004
Offline Last Active Sep 13 2012 02:32 PM

Posts I've Made

In Topic: Top-down Car Physics. Drifting, Collisions & Ai.

13 September 2012 - 01:53 PM

I haven't used Game Maker for quite a while now, and therefore it's kinda out of date. If someone is willing to share me an uptodate version for me to put on the first post, it would be apreciated... credit would ofcourse be given.

Hello, I'm making a 3d car racing game. My main problem is how will the other cars (enemy/computer) automatically rotate on every turn. It follows the path but it stays only in one angle. I've executed a code on Step event image_angle=direction+180; but it doesn't work. The car follows the path but cannot rotate every turn. How can I fix this? Please help me. I need to finish my game ASAP because it is our project in school and due date is near. Thank you. :)


image_angle is just for 2d sprites, doesnt rotate an 3d object... unless GM changed abit the last 2 years :P

In Topic: Preview of Upcoming Games

16 March 2011 - 08:11 PM

zPop


Top-down zombie TD (Blog)

Posted Image


In Topic: Tower Defence MAjor Issue

13 March 2011 - 05:56 PM


object 'Enemy' is trying to change its own variable 'money' when outside room, there are however no initiaded variable 'money'. Object 'Variables' have initiated a variable named 'money' though, if you intend to change that variable, change 'money -= 2" to "Variables.money -=2". Same goes for the variable 'escaped'. Don't forget to destroy the instance aswell when outside the room.

A suggestion is to use global variables, read more about it in the manual (F1)


Global variables work but now I've got my money to continue on decreasing.

As i said, destroy instances when they are outside the room -> "instance_destroy()". "Outside room" event will be called over and over again otherwise, and therefore continue to decrease your money.

In Topic: Tower Defence MAjor Issue

13 March 2011 - 05:30 PM

object 'Enemy' is trying to change its own variable 'money' when outside room, there are however no initiaded variable 'money'. Object 'Variables' have initiated a variable named 'money' though, if you intend to change that variable, change 'money -= 2" to "Variables.money -=2". Same goes for the variable 'escaped'. Don't forget to destroy the instance aswell when outside the room.

A suggestion is to use global variables, read more about it in the manual (F1)

In Topic: Problem In My Drifting Game!

13 March 2011 - 11:24 AM

The engine is far from perfect. The AI wants to turn for the smallest difference between the appointed and current direction. This creates a sort of pendulum effect because of over-steering. Can be fixed by reducing the sensitivity of the steering.

Change
pressLeft = sign(rotDif) == -1;
pressRight = sign(rotDif) == 1;
In scr_carUpdate_AI() line 22 & 23 to
pressLeft = (rotDif<-10)
pressRight = (rotDif>10)

Replacing '10' with a higher value will reduce the sensitivity further.



ps, better to keep questions regarding this engine in the topic for it.