-Thank you for your help-
If object in view code
Started by Devilfromhost12, Feb 26 2012 03:21 AM
2 replies to this topic
#1
Posted 26 February 2012 - 03:21 AM
So I'll have this object called obj_enemy_parent that parents ever enemy. I want it to where if obj_enemy_parent is in view 1, it sets a variable called in_view to true. How would I do that. Or where if obj_enemy_parent is in view 1 it does alarm0=150. Either way it would be like the same thing.
But how would I do that.
-Thank you for your help-
-Thank you for your help-
#2
Posted 26 February 2012 - 03:54 AM
pretty close to this
in_view = x>view_xview[1] && x<view_xview[1]+view_wview[1] &&
y>view_yview[1] && y<view_yview[1]+view_hview[1];
if in_view // inside view
if alarm[0]<0 // if the alarm is off
alarm[0]=150;
#3
Posted 26 February 2012 - 04:17 AM
pretty close to this
in_view = x>view_xview[1] && x<view_xview[1]+view_wview[1] && y>view_yview[1] && y<view_yview[1]+view_hview[1]; if in_view // inside view if alarm[0]<0 // if the alarm is off alarm[0]=150;
So would that be like in the obj_enemy_parent create code?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











