October 04, 2023, 05:15:07 pm

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Due to a rise in bot activity, new posters need to be approved before posting.

Join the community Discord server!

Pages: [1]

Author Topic: DetectedCheck  (Read 2482 times)

Machidro

  • 2013 Haxxy Award Winner
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 1674
  • Gardicolo time is over.
DetectedCheck
« on: June 12, 2012, 09:27:47 pm »



<link removed>

When you play as spy, shows whether you are (or would be) passively invisible to a player by displaying a small question mark above their head.

Version: Any.
Conflicts: None Known.
« Last Edit: May 23, 2013, 10:45:31 pm by Phantom Brave »
Logged
A CHALLENGER HAS ARRIVED.

ajf

  • Guest
Re: DetectedCheck
« Reply #1 on: June 27, 2012, 10:42:53 am »

Wait how does this work? Shows whether you're visible to them or something?
Logged

Footpöp

  • Veteran Member
  • ******
  • Karma: 24
  • Offline Offline
  • Posts: 4088
  • I /saw/ him
Re: DetectedCheck
« Reply #2 on: June 27, 2012, 10:50:55 am »

yes

this idea stems from a feature request to make passive invisibility more clear to the end user, specifically with newbies in mind who probably don't even know that it exists.

damn ajf, stay on top of the game, you certainly don't do anything else other than gg2  :hehe16:
Logged
Team /ABC/

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12699
  • Another one --
Re: DetectedCheck
« Reply #3 on: May 23, 2013, 10:47:47 pm »

I was just told that this happens to let you see spies which are passively invisible to you. If that's the case, any version which happens to do so is considered a cheat. I've preemptively removed the link to the plugin from the OP. If this is in error, let me know. Any version which doesn't do this may be posted.
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

ajf

  • (Ex-?)Developer and forum/web admin
  • *****
  • Karma: 7
  • Offline Offline
  • Posts: 3493
  • she's never quite as dead as you think
Re: DetectedCheck
« Reply #4 on: May 24, 2013, 07:02:58 pm »

I fixed it so that doesn't happen. I also simplified the source, reformatted it, commented it, and maybe fixed a bug. Have a nice day :z6:

Code: [Select]
object_event_add(Character, ev_draw, 0, "
    // I'm playing as spy and have a Character object
    if (global.myself.class == CLASS_SPY && global.myself.object != -1)
    {
        // This player is not on my team and isn't cloaked
        if (team != global.myself.team && !cloak)
        {
            // This player isn't passively invisible to me
            if (!((global.myself.object.x - x) / sign(global.myself.object.image_xscale) > 0))
            {
                // I'm passively invisible to this player
                if ((x - global.myself.object.x) / sign(image_xscale) > 0)
                {
                    draw_sprite_ext(BubblesS,21,x-5,y-30,0.5,0.5,0,c_white,1);
                }
            }
        }
    }
");
« Last Edit: May 24, 2013, 07:03:21 pm by ajf »
Logged
did you know that spinning stars work like this???

I've seen things you people wouldn't believe. execute_strings on fire off the shoulder of Overmars. I watched object-beams glitter in the dark near the room_goto_fix. All those moments will be lost in time, like tears...in...rain. Time to die.

Catman

  • The Argumental
  • Veteran Member
  • ******
  • Karma: 18
  • Offline Offline
  • Posts: 4375
  • Take on me
    • Yuki Yuki Yuki
Re: DetectedCheck
« Reply #5 on: May 25, 2013, 05:13:38 am »

Cool, I'll swap the code out now then.
Logged
My style is the best...
...so I challenge you!
Pages: [1]
 

Page created in 0.029 seconds with 37 queries.