GMS 2 [Solved] Can I hide one object (invisible) in one of the views?

G

gnemnij

Guest
Hi guys.

I am making a local multiply shooter game, using split screens. I need a stuff like bush in LoL, where another player can't see you when you are inside and he is not. I would like to know if this is possible in GMS, and how to do that.

Thanks!
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
You can - by checking view_current variable in the Draw event to determine whether to draw anything. See the manual for more information.
 
G

gnemnij

Guest
I tried but it seems only switch the whole view on and off, I can't make one specific object disapper. could you explain this with an example? Thank you very much!
You can - by checking view_current variable in the Draw event to determine whether to draw anything. See the manual for more information.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
I tried but it seems only switch the whole view on and off, I can't make one specific object disapper. could you explain this with an example? Thank you very much!
Having the Draw-event structured like
Code:
if (view_current == 0) draw_self();
would only draw the instance inside view 0.
 
P

Phillip

Guest
Ok, I'm having an entirely different issue over here,
I'm drawing a surface to a view[1] as the layer GUI is free from views.
 
Last edited by a moderator:
Top