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
  • 395 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
Posted Image
That little green + at the bottom right of my post will send you to another dimention where I have 1 more reputation point. Go ahead, click it. Then tell me I'm wrong. I clicked on the green + and got sent to another dimention where I have 1 more reputation point. And thats why there is no I in Kriven.

#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
If my feedback was valuable to your WIP, earn some good kharma points and give me some feedback on mine! :D
Click here for Berzerk Announcement thread in WIPs or...
just download the Berzerk: Otto Destruct WIP
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users