September 05, 2025, 04:39:38 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Wondering where all the forums have gone?

Join the community Discord server!

Pages: 1 ... 4 5 [6] 7 8 ... 15

Author Topic: ITT we make fun of stupid stuff in GML  (Read 42314 times)

Catman

  • The Argumental
  • Veteran Member
  • ******
  • Karma: 18
  • Offline Offline
  • Posts: 4047
  • Take on me
    • Yuki Yuki Yuki
Re: ITT we make fun of stupid stuff in GML
« Reply #75 on: August 18, 2013, 09:58:12 am »

if canshoot = 1 {
    if mouse_check_button(mb_left) = 1
    {
        repeat(1) instance_create(x,y-1,oBullet);
        canshoot = 0;
        alarm[0] = 1;
    }
};

Can anyone explain to me why this only works when I'm holding right click as well as left click?
Logged
My style is the best...
...so I challenge you!

iLegend

  • 2013 Haxxy Award Winner
  • *****
  • Karma: 0
  • Offline Offline
  • Posts: 868
  • Force is always the answer.
    • Mah Resume
Re: ITT we make fun of stupid stuff in GML
« Reply #76 on: August 18, 2013, 10:38:52 am »

shouldn't those equal signs be double equal signs? like canshoot == 1
or maybe thats just old habits from other languages and gml being really lenient.
Logged
<SecretMan> do i put BotAim.gml in plugins folder?
i hear los angeles is pretty good for casual sex with minors

Catman

  • The Argumental
  • Veteran Member
  • ******
  • Karma: 18
  • Offline Offline
  • Posts: 4047
  • Take on me
    • Yuki Yuki Yuki
Re: ITT we make fun of stupid stuff in GML
« Reply #77 on: August 18, 2013, 10:46:28 am »

Gamemaker is fine with either
Logged
My style is the best...
...so I challenge you!

ajf

  • (Ex-?)Developer and forum/web admin
  • *****
  • Karma: 7
  • Offline Offline
  • Posts: 3415
  • she's never quite as dead as you think
Re: ITT we make fun of stupid stuff in GML
« Reply #78 on: August 18, 2013, 11:52:29 am »

if canshoot = 1 {
    if mouse_check_button(mb_left) = 1
    {
        repeat(1) instance_create(x,y-1,oBullet);
        canshoot = 0;
        alarm[0] = 1;
    }
};

Can anyone explain to me why this only works when I'm holding right click as well as left click?
I'd hazard a guess that PlayerControl "clears" the button somewhere but doesn't for right-click.
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: 4047
  • Take on me
    • Yuki Yuki Yuki
Re: ITT we make fun of stupid stuff in GML
« Reply #79 on: August 18, 2013, 12:34:09 pm »

Looking at the info I get from the mouse_button variable, left click is 1 and right click is 2. When I hold right click it equals two and turns to one when I then hold left click, if I hold left click on it's own it is also one.

When I set up the code to run from 'if mouse_button = 1' it didn't make any difference, it still only worked when I had right click held...
Logged
My style is the best...
...so I challenge you!

Catman

  • The Argumental
  • Veteran Member
  • ******
  • Karma: 18
  • Offline Offline
  • Posts: 4047
  • Take on me
    • Yuki Yuki Yuki
Re: ITT we make fun of stupid stuff in GML
« Reply #80 on: August 18, 2013, 03:47:23 pm »

I just realized why this isn't working, I left some code in the draw event of oBullet which makes it only do the checks if right click is held, which is redundant seeing as I spawn that object on left click.
Logged
My style is the best...
...so I challenge you!

ajf

  • (Ex-?)Developer and forum/web admin
  • *****
  • Karma: 7
  • Offline Offline
  • Posts: 3415
  • she's never quite as dead as you think
Re: ITT we make fun of stupid stuff in GML
« Reply #81 on: August 24, 2013, 07:18:59 pm »

[01:17] <@ajf> this bug was also me being dumb
[01:17] <@ajf> but also GM
[01:17] <@ajf> I mean jesus fuck
[01:17] <@ajf> (0).x
[01:18] <@ajf> should not error that no such variable x
[01:18] <@ajf> it should error that no such object 0
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.

iLegend

  • 2013 Haxxy Award Winner
  • *****
  • Karma: 0
  • Offline Offline
  • Posts: 868
  • Force is always the answer.
    • Mah Resume
Re: ITT we make fun of stupid stuff in GML
« Reply #82 on: August 24, 2013, 08:00:27 pm »

How do you accidentally type (0).x
Logged
<SecretMan> do i put BotAim.gml in plugins folder?
i hear los angeles is pretty good for casual sex with minors

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12519
  • Another one --
Re: ITT we make fun of stupid stuff in GML
« Reply #83 on: August 24, 2013, 08:05:32 pm »

he didn't
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: 3415
  • she's never quite as dead as you think
Re: ITT we make fun of stupid stuff in GML
« Reply #84 on: August 24, 2013, 09:08:19 pm »

he didn't
That code won't actually parse, I think. I was just doing that to mean instance.n where instance = 0.
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.

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3624
    • My own website
Re: ITT we make fun of stupid stuff in GML
« Reply #85 on: August 26, 2013, 10:20:55 am »

Drawing text when suddenly gm can't even do that anymore.


(click to show/hide)
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

iLegend

  • 2013 Haxxy Award Winner
  • *****
  • Karma: 0
  • Offline Offline
  • Posts: 868
  • Force is always the answer.
    • Mah Resume
Re: ITT we make fun of stupid stuff in GML
« Reply #86 on: August 26, 2013, 12:59:40 pm »

I hit this same problem when making pixel art stuff in other languages because if you don't round the coordinates they'll just anti alias the shit out of it by blurring it between two pixels.
I guess gml doesn't even blur it, it just disappears.
« Last Edit: August 26, 2013, 12:59:51 pm by iLegend »
Logged
<SecretMan> do i put BotAim.gml in plugins folder?
i hear los angeles is pretty good for casual sex with minors

ajf

  • (Ex-?)Developer and forum/web admin
  • *****
  • Karma: 7
  • Offline Offline
  • Posts: 3415
  • she's never quite as dead as you think
Re: ITT we make fun of stupid stuff in GML
« Reply #87 on: August 26, 2013, 01:12:51 pm »

I hit this same problem when making pixel art stuff in other languages because if you don't round the coordinates they'll just anti alias the shit out of it by blurring it between two pixels.
I guess gml doesn't even blur it, it just disappears.
I assume GM usually uses a non-anti-alising rendering thing or just rounds it. Maybe it's actually the former and that's why it fucks up the text.
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.

iLegend

  • 2013 Haxxy Award Winner
  • *****
  • Karma: 0
  • Offline Offline
  • Posts: 868
  • Force is always the answer.
    • Mah Resume
Re: ITT we make fun of stupid stuff in GML
« Reply #88 on: August 26, 2013, 01:20:49 pm »

does gm even support anti aliasing?
Logged
<SecretMan> do i put BotAim.gml in plugins folder?
i hear los angeles is pretty good for casual sex with minors

Catman

  • The Argumental
  • Veteran Member
  • ******
  • Karma: 18
  • Offline Offline
  • Posts: 4047
  • Take on me
    • Yuki Yuki Yuki
Re: ITT we make fun of stupid stuff in GML
« Reply #89 on: August 26, 2013, 01:23:05 pm »

If it does, it might come in handy for making GG2 look decent in full screen
Logged
My style is the best...
...so I challenge you!
Pages: 1 ... 4 5 [6] 7 8 ... 15
 

Page created in 0.043 seconds with 44 queries.