Jump to content


Photo

Tron lightcycle effect help


  • Please log in to reply
8 replies to this topic

#1 Dr Awesimo

Dr Awesimo

    GMC Member

  • New Member
  • 5 posts
  • Version:GM8

Posted 30 January 2012 - 08:45 AM

I am wondering how to make a tron light cycle effect where it leaves a trail behind it and if you crash into it you lose so how would a beginner go about doing this?
(I have pro version)
  • 0

#2 twelveways

twelveways

    GMC Member

  • GMC Member
  • 1383 posts

Posted 30 January 2012 - 09:00 AM

A simple but iniefficient way would be to leave a trail of objects behind you.

A better but more complicated way would be to use an mp_grip and tiles/surface
  • 0

#3 Dr Awesimo

Dr Awesimo

    GMC Member

  • New Member
  • 5 posts
  • Version:GM8

Posted 30 January 2012 - 09:10 AM

Im completely new to all of this so what I did try is the first option but the player/bike what ever you want to call it would collide with the object as soon as it was put down so that didnt really work so how would the second option work?
  • 0

#4 twelveways

twelveways

    GMC Member

  • GMC Member
  • 1383 posts

Posted 30 January 2012 - 09:13 AM

only place the block (or make it collidable) when it is not touching the bike.

The second way is actually quite complicated and would require you to read up on movement grids.
  • 0

#5 Dr Awesimo

Dr Awesimo

    GMC Member

  • New Member
  • 5 posts
  • Version:GM8

Posted 30 January 2012 - 09:19 AM

So what exactly would i need to make it so that the block is not touching the bike when it is put down?
  • 0

#6 Helios Machina

Helios Machina

    GMC Member

  • New Member
  • 32 posts
  • Version:GM8

Posted 30 January 2012 - 10:31 AM

So what exactly would i need to make it so that the block is not touching the bike when it is put down?


If you want to make it spawn an object like that, the crude way to do it would be to make the bike spawn an invisible object which checks if it is in contact with the bike, and when it isn't it'll spawn the "trail" object and then destroy itself (to prevent it from spawning infinite trail objects on top of each other). Of course, you could also make the trail object non-collideable at first, have it check if it is touching the bike and when it isn't, have it change to collideable and then tell it to stop checking if it is in contact with the bike (to prevent all the trail objects from constantly checking, that could cause some nasty lag)

Edit oh yeah sorry, that might not have been entirely specific. What you can do is to tell the bike when it collides with a trail, to check if it has, for example, trailcollision = 1 (that's a value I just made up, you can call it whatever you want). Then when you spawn the trail object from the bike at first, have the trailcollision be equal to 0 until the bike is no longer in contact with the trail after spawning it, then change it to 1 so that the bike object will check on collision "Is this collideable? Yes it is! *bam*"

Edited by Helios Machina, 30 January 2012 - 10:35 AM.

  • 0

#7 Dr Awesimo

Dr Awesimo

    GMC Member

  • New Member
  • 5 posts
  • Version:GM8

Posted 30 January 2012 - 10:47 AM

I understand what you mean but im so new at this I dont know how to put it in to gamemaker to make it work



*EDIT*

well i got it to work so the invisible object creates the trail yay but it still is to close to the bike so i guess what i want to know now is how to make it check to see if its to close to the bike?

Edited by Dr Awesimo, 30 January 2012 - 12:08 PM.

  • 0

#8 Dreamsequence

Dreamsequence

    GMC Member

  • GMC Member
  • 97 posts
  • Version:GM:Studio

Posted 30 January 2012 - 03:22 PM

I understand what you mean but im so new at this I dont know how to put it in to gamemaker to make it work



*EDIT*

well i got it to work so the invisible object creates the trail yay but it still is to close to the bike so i guess what i want to know now is how to make it check to see if its to close to the bike?

Have it check for collision with the bike object in the code before it spawns the trail. Have the invisible object check if it's colliding with the bike, then spawn the trail object once the bike is far enough away.
  • 0

#9 Dr Awesimo

Dr Awesimo

    GMC Member

  • New Member
  • 5 posts
  • Version:GM8

Posted 31 January 2012 - 09:10 AM

Thanks everyone finally got it to work :biggrin: huzzah!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users