Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> How can I make things only appear in certain views, (GM)
United Kingdom
Thingy
Posted: May 31 2009, 01:45 PM
Quote Post


So long MFGG 2.0~
[*][*][*][*]

Group Icon
Group: Members
Posts: 1824
Member No.: 4642
Joined: 30-October 07

Status: (0d) [--]


So [NAME goes here] uses multiple views to make the screen and HUD parts, include a remote camera.

Everything has a white box around it so it ends up that I can see the boxes when the views overlap.

I don't want to remove the boxes, as it helps seperate things, so does anyone know how I can make them only appear in their own views?


--------------------
user posted image
Old ref, Current ref
Click to see the rest. (opens sig on top post)

user posted image
Hey, MFGG 3.0, it's me from the past.
PMEmail PosterMSN
Top
Sweden
JosJuice
Posted: Jun 1 2009, 08:55 AM
Quote Post


Threw an apple at Caterpie! It's a good pizza topping
[*][*]

Group Icon
Group: Members
Posts: 318
Member No.: 4596
Joined: 19-October 07

Status: (0d) [--]


This code might work:


In Draw Event:
CODE
if view_current=0 {<draw sprite/whatever here>)

Replace 0 with the view you want the box to be visible in.


--------------------
user posted image
QUOTE (Darkyoshi @ Dec 19 2008, 05:09 PM)
I remading it to make a Free-Glitch version
QUOTE (Keyser Soze @ Dec 21 2008, 12:28 AM)
Thank god I thought I was going to have to PAY for my glitches!

user posted image
QUOTE
You know what they say toast is toast. ;3
PM
Top
United Kingdom
Thingy
Posted: Jun 1 2009, 12:11 PM
Quote Post


So long MFGG 2.0~
[*][*][*][*]

Group Icon
Group: Members
Posts: 1824
Member No.: 4642
Joined: 30-October 07

Status: (0d) [--]


QUOTE (JosJuice @ Jun 1 2009, 02:55 PM)
This code might work:


In Draw Event:
CODE
if view_current=0 {<draw sprite/whatever here>)

Replace 0 with the view you want the box to be visible in.

Are you sure that won't make it only appear when it's in a certain view.

As I said this uses multiple views which overlap, and I want it to be able to appear in one but not the other, regardless of whether it's overlapping.


--------------------
user posted image
Old ref, Current ref
Click to see the rest. (opens sig on top post)

user posted image
Hey, MFGG 3.0, it's me from the past.
PMEmail PosterMSN
Top
Sweden
JosJuice
Posted: Jun 1 2009, 11:43 PM
Quote Post


Threw an apple at Caterpie! It's a good pizza topping
[*][*]

Group Icon
Group: Members
Posts: 318
Member No.: 4596
Joined: 19-October 07

Status: (0d) [--]


I don't understand...


If you want it to be visible in all views but one, use this:
CODE
if view_current!=0 {<draw sprite/whatever here>)

Replace 0 with the view you don't want to see it in.


--------------------
user posted image
QUOTE (Darkyoshi @ Dec 19 2008, 05:09 PM)
I remading it to make a Free-Glitch version
QUOTE (Keyser Soze @ Dec 21 2008, 12:28 AM)
Thank god I thought I was going to have to PAY for my glitches!

user posted image
QUOTE
You know what they say toast is toast. ;3
PM
Top
Sweden
Alex
Posted: Jun 3 2009, 06:10 AM
Quote Post


In Donaldismo Veritas
[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 1678
Member No.: 5509
Joined: 9-July 08

Status: (0d) [--]


I THINK that Thingy means that he's using multiple views at the same time, and even when this box WOULD have appeared in both of them, it should only appear in one.

Bad explanation :D


--------------------
user posted image
--------------------
My character has been drawn by:
NICKtendo DS
Jazz
Tek
PM
Top
Sweden
Boomb
Posted: Jun 3 2009, 07:02 AM
Quote Post


Exploding awesomeness!
[*][*][*]

Group Icon
Group: Members
Posts: 723
Member No.: 4724
Joined: 16-November 07

Status: (0d) [--]


Is this even possible?


--------------------
PMEmail PosterUsers Website
Top
Sweden
Alex
Posted: Jun 3 2009, 07:08 AM
Quote Post


In Donaldismo Veritas
[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 1678
Member No.: 5509
Joined: 9-July 08

Status: (0d) [--]


Maybe...
Instead of just showing the view, you use the draw function to draw ALL objects's sprite_indexes, and the background_indexes. You have one object for each view, and you let the view0 object not draw the box that shouldn't be shown in that view

I'm not sure if it'll work


--------------------
user posted image
--------------------
My character has been drawn by:
NICKtendo DS
Jazz
Tek
PM
Top
Finland
fiDumppi
Posted: Jun 3 2009, 09:08 AM
Quote Post


Hi! I'm Fidu!
[*][*]

Group Icon
Group: Members
Posts: 437
Member No.: 4711
Joined: 13-November 07

Status: (0d) [--]


Try this in the object's Draw event:
CODE

draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,0,0,image_alpha)
if view_current=0 {image_alpha=0}
else {image_alpha=1}

This makes the object invisible in View 0 and visible in the rest of the views.

Hope that helps!


--------------------

user posted image
user posted image user posted image user posted image user posted image user posted image user posted image user posted image
user posted image
PMEmail PosterUsers Website
Top
Sweden
JosJuice
Posted: Jun 3 2009, 09:51 AM
Quote Post


Threw an apple at Caterpie! It's a good pizza topping
[*][*]

Group Icon
Group: Members
Posts: 318
Member No.: 4596
Joined: 19-October 07

Status: (0d) [--]


QUOTE (fiDumppi @ Jun 3 2009, 04:08 PM)
Try this in the object's Draw event:
CODE

draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,0,0,image_alpha)
if view_current=0 {image_alpha=0}
else {image_alpha=1}

This makes the object invisible in View 0 and visible in the rest of the views.

Hope that helps!

Shouldn't it be more like this?
CODE
if view_current=0 {image_alpha=0}
else {image_alpha=1}
draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,0,0,image_alpha)


This post has been edited by JosJuice on Jun 3 2009, 09:53 AM


--------------------
user posted image
QUOTE (Darkyoshi @ Dec 19 2008, 05:09 PM)
I remading it to make a Free-Glitch version
QUOTE (Keyser Soze @ Dec 21 2008, 12:28 AM)
Thank god I thought I was going to have to PAY for my glitches!

user posted image
QUOTE
You know what they say toast is toast. ;3
PM
Top
India
Char
Posted: Jun 3 2009, 11:12 AM
Quote Post


fad was bad
[M][*][*]

Group Icon
Group: Admins
Posts: 2123
Member No.: 2856
Joined: 25-October 06

Status: (0d) [--]


more like draw_set_alpha(0) and draw_set_alpha(1)


--------------------
aa this broke


Make your own | If a level is breaking the rules, note the ID and PM me.
Reference (thanks Frogjester!)
PMEmail PosterUsers WebsiteAOLYahooMSN
Top
United Kingdom
Thingy
Posted: Jun 3 2009, 11:55 AM
Quote Post


So long MFGG 2.0~
[*][*][*][*]

Group Icon
Group: Members
Posts: 1824
Member No.: 4642
Joined: 30-October 07

Status: (0d) [--]


QUOTE (JosJuice @ Jun 1 2009, 02:55 PM)
This code might work:


In Draw Event:
CODE
if view_current=0 {<draw sprite/whatever here>)

Replace 0 with the view you want the box to be visible in.

Sorry, I forgot to mention, this one worked fine.


--------------------
user posted image
Old ref, Current ref
Click to see the rest. (opens sig on top post)

user posted image
Hey, MFGG 3.0, it's me from the past.
PMEmail PosterMSN
Top
Sweden
JosJuice
Posted: Jun 3 2009, 11:58 AM
Quote Post


Threw an apple at Caterpie! It's a good pizza topping
[*][*]

Group Icon
Group: Members
Posts: 318
Member No.: 4596
Joined: 19-October 07

Status: (0d) [--]


QUOTE (Char @ Jun 3 2009, 06:12 PM)
more like draw_set_alpha(0) and draw_set_alpha(1)

draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,0,0,image_alpha)


--------------------
user posted image
QUOTE (Darkyoshi @ Dec 19 2008, 05:09 PM)
I remading it to make a Free-Glitch version
QUOTE (Keyser Soze @ Dec 21 2008, 12:28 AM)
Thank god I thought I was going to have to PAY for my glitches!

user posted image
QUOTE
You know what they say toast is toast. ;3
PM
Top
India
Char
Posted: Jun 3 2009, 12:04 PM
Quote Post


fad was bad
[M][*][*]

Group Icon
Group: Admins
Posts: 2123
Member No.: 2856
Joined: 25-October 06

Status: (0d) [--]


QUOTE (JosJuice @ Jun 3 2009, 10:28 PM)
draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,0,0,image_alpha)

whoops


--------------------
aa this broke


Make your own | If a level is breaking the rules, note the ID and PM me.
Reference (thanks Frogjester!)
PMEmail PosterUsers WebsiteAOLYahooMSN
Top
Finland
fiDumppi
Posted: Jun 4 2009, 12:32 AM
Quote Post


Hi! I'm Fidu!
[*][*]

Group Icon
Group: Members
Posts: 437
Member No.: 4711
Joined: 13-November 07

Status: (0d) [--]


QUOTE (JosJuice @ Jun 3 2009, 04:51 PM)
Shouldn't it be more like this?
CODE
if view_current=0 {image_alpha=0}
else {image_alpha=1}
draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,0,0,image_alpha)

Why? It works either way.


--------------------

user posted image
user posted image user posted image user posted image user posted image user posted image user posted image user posted image
user posted image
PMEmail PosterUsers Website
Top
Sweden
Alex
Posted: Jun 4 2009, 01:34 AM
Quote Post


In Donaldismo Veritas
[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 1678
Member No.: 5509
Joined: 9-July 08

Status: (0d) [--]


QUOTE (fiDumppi @ Jun 4 2009, 07:32 AM)
Why? It works either way.

You drew the sprite first, and then set the alpha for the next step's draw event.
JosJuice set the alpha first, and then drew the sprite. Meaning your variant would have a one-step delay of alphas.


--------------------
user posted image
--------------------
My character has been drawn by:
NICKtendo DS
Jazz
Tek
PM
Top
Finland
fiDumppi
Posted: Jun 4 2009, 01:40 AM
Quote Post


Hi! I'm Fidu!
[*][*]

Group Icon
Group: Members
Posts: 437
Member No.: 4711
Joined: 13-November 07

Status: (0d) [--]


QUOTE (Alex @ Jun 4 2009, 08:34 AM)
You drew the sprite first, and then set the alpha for the next step's draw event.
JosJuice set the alpha first, and then drew the sprite. Meaning your variant would have a one-step delay of alphas.

headslap.gif Why didn't I think of that?


--------------------

user posted image
user posted image user posted image user posted image user posted image user posted image user posted image user posted image
user posted image
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0766 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 1.31 ]