Catching Fire =d |
Novice and intermediate users who are using Drag & Drop action icons, or still learning GML, can get help from more experienced members.
Please READ the Novice Q&A Forum Rules prior to posting. And remember that the General GMC Rules apply here too.
![]() ![]() |
Catching Fire =d |
Nov 3 2009, 08:45 AM
Post
#1
|
|
|
R159PRODUCTIONS.TK Group: GMC Member Posts: 130 Joined: 19-July 09 Member No.: 136725 |
I have a 'flaming box'. When a part of the flame (using a ps) touches the normal box, i want the normal boxes variable (nofire) to go down by 1.
Can anyone help me acheive this? |
|
|
|
Nov 3 2009, 09:49 AM
Post
#2
|
|
|
R159PRODUCTIONS.TK Group: GMC Member Posts: 130 Joined: 19-July 09 Member No.: 136725 |
I also want obj_enemy to set alarm[0] to 5 if it touches fire.
|
|
|
|
Nov 3 2009, 07:03 PM
Post
#3
|
|
|
Pendulum Fan Group: GMC Member Posts: 69 Joined: 12-May 08 From: My house in CANADA! Member No.: 106818 |
Well, if you're using a particle system for the fire, you can't do collisions with particles, so use objects for the fire or a special bounding box instead.
|
|
|
|
Nov 3 2009, 07:19 PM
Post
#4
|
|
|
GML Educator Group: GMC Member Posts: 2392 Joined: 19-July 06 From: Australia GMT+10:00 Member No.: 55111 |
How thick is the fire? You could get away with an area check...?
|
|
|
|
Nov 3 2009, 08:09 PM
Post
#5
|
|
|
R159PRODUCTIONS.TK Group: GMC Member Posts: 130 Joined: 19-July 09 Member No.: 136725 |
not really... The fire sort of 'burns' away the object (just a sprite slowly burning from the top) and as it burns down, the fire area shrinks as well. (to make it more realistic)
|
|
|
|
Nov 3 2009, 09:30 PM
Post
#6
|
|
|
GML Educator Group: GMC Member Posts: 2392 Joined: 19-July 06 From: Australia GMT+10:00 Member No.: 55111 |
Well, in that case, I don't have the GameMaker manual on me but If I remember correctly there aren't any ways to check for particle collisions unless you use an (emitter, transformer? - check the particles tutorial on YoYo Games, it has an example) and detect when the particle kinds change.
Alternatively, if lag is not a problem, using objects would most likely be much easier. Regards, -Schyler- |
|
|
|
Nov 4 2009, 04:24 AM
Post
#7
|
|
|
R159PRODUCTIONS.TK Group: GMC Member Posts: 130 Joined: 19-July 09 Member No.: 136725 |
Ok i will check...
Any other ways though? |
|
|
|
Nov 4 2009, 04:35 AM
Post
#8
|
|
|
GMC Member Group: GMC Member Posts: 374 Joined: 10-May 09 Member No.: 133134 |
You could use screen_save() to record a particle system and animate it into a sprite. That what i do. Then you can have a collision and no lag. You could also formulate your own particle system and add in collisions, but you might not want to go that far.
|
|
|
|
Nov 4 2009, 05:37 AM
Post
#9
|
|
|
R159PRODUCTIONS.TK Group: GMC Member Posts: 130 Joined: 19-July 09 Member No.: 136725 |
ok... i tried using collision rectangle... I don't know why it isn't working:
CODE if collision_rectangle(x-16,flametop,x+16,y,obj_block,0,0)<0 { other.nofire-=1 } if collision_rectangle(x-16,flametop,x+16,y,obj_enemy,0,0)<0 { other.life-=1 } could anyone help? |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd November 2009 - 10:40 AM |