Jump to content


Photo

Coding Question


  • Please log in to reply
3 replies to this topic

#1 CaptainDJ

CaptainDJ

    GMC Member

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

Posted 03 August 2012 - 08:10 PM

Hey,

I have this for my bullet.
if (place_meeting(x,y,obj_parent_hostile||obj_parent_breakables||obj_parent_explosives))

Im not sure if your allowed to put more than one object in the code.

I tried it and it doesn't work. Is there a way I can do this or do I have to write it like this:

if (place_meeting(x,y,obj_parent_hostile)||place_meeting(x,y,obj_parent_breakables)||place_meeting(x,y,obj_parent_explosives))

Edited by CaptainDJ, 03 August 2012 - 08:10 PM.

  • 0

#2 Mercerenies

Mercerenies

    Koopa King

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

Posted 03 August 2012 - 08:22 PM

Yes, you have to write it out. The way you did it in the second code block should work.

Edited by Mercerenies, 03 August 2012 - 08:22 PM.

  • 1

#3 Big J

Big J

    GMC Member

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

Posted 03 August 2012 - 08:26 PM

One could group the 3 parents under another parent and simplify the code.
  • 1

#4 CaptainDJ

CaptainDJ

    GMC Member

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

Posted 03 August 2012 - 08:34 PM

Alright thanks.

Man, why didn't I think of that! xD

Making a parent for all 3 parents works like a charm. :D

Edited by CaptainDJ, 03 August 2012 - 08:36 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users