Jump to content


Photo

I Need help using triggers


  • Please log in to reply
1 reply to this topic

#1 Zoltan Kriven

Zoltan Kriven

    GMC Member

  • GMC Member
  • 387 posts
  • Version:GM8.1

Posted 01 May 2012 - 08:02 PM

I need to know the code to put in my trigger. My objects that have to be touching are: Drill_obj and Gas_station_obj. Then when the objects are touching, pressing Space Bar should trigger the event. Any help would be greatly appriciated. Thank you.

Edited by Zoltan Kriven, 01 May 2012 - 08:36 PM.

  • 0

#2 integrate

integrate

    GMC Member

  • GMC Member
  • 255 posts
  • Version:GM8

Posted 01 May 2012 - 09:45 PM

I need to know the code to put in my trigger. My objects that have to be touching are: Drill_obj and Gas_station_obj. Then when the objects are touching, pressing Space Bar should trigger the event. Any help would be greatly appriciated. Thank you.


In one object's Collision event (with the other object), add the code for a spacebar event like so:

In the Gas_station_obj COLLISION event (with Drill_obj)
if keyboard_check(vk_space)
 {
  //some fun code here
 }

Edited by integrate, 01 May 2012 - 09:46 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users