PoG: Coding Problem
- Login to post comments
Mon, 09/23/2013 - 01:11
I just want to know how do you enlarge monsters by using coding? I was trying to use the advanced level coding and this is what happened:
with (m_bit) {radius=500;} m_emitter.bit_number=1;
Can someone please help me with this?
There's one more thing than radius: Game Maker default parameters image_xscale and image_yscale.
e.g.
image_xscale*=2; image_yscale*=2;
(Radius 500 is huge - like a width of screen - you mean 50? Big Pokey has radius=32...)
To apply it to bits you have to put the code to cutom event, because at the beginning there's no bit:
m_emitter.bit_number=1; custom_event="with(m_bit) if(radius<50) {radius=50; image_xscale*=2; image_yscale*=2;}"
You have to experiment what factor for scales is good.
Author of Platforms of Goo and 64 levels for World of Goo .
Because I need to enlarge the bit monster like double times the size of a normal bit ball.
EVERYTHING AMAZING BY INWOG
inwog, publisher of 407 World of Goo levels since 2009-2015
I guess radius 28 or 30 would be enough. In general radius is important for m_bomb_d and m_pokey, because they are internaly squares (and radius is used for calculating rotation speed). m_bit is circle, so you can put even too big radius and it won't lead to problems, but scale params are important. m_bit has default image_xscale=0.6;image_yscale=0.6;radius=15;.
Author of Platforms of Goo and 64 levels for World of Goo .
Never mind, I scrapped the idea, but thanks for the coding example!
EVERYTHING AMAZING BY INWOG
inwog, publisher of 407 World of Goo levels since 2009-2015
Another thing, how do I separate sounds between objects. For example, I want the Fuse Bonus to have the normal sizzle sound and a Bomb Monster to have a nuke sound.
EVERYTHING AMAZING BY INWOG
inwog, publisher of 407 World of Goo levels since 2009-2015
It cannot be done in any easy way. Ignition sounds are played automaticaly. You can only play additional sounds with "custom event":
m_bomb_s.free=1; custom_event="with(m_bomb_s) if (ignite && free) {sound_play(sd_water); sound_stop(sd_ignite); free=0;}"
If you change sd_water sound (or other not used sound, like sd_bit_death) into nuke sound it should work.
Author of Platforms of Goo and 64 levels for World of Goo .
Another thing, can two custom events can be used in a level? For example, I want falling blocks and monster having a can together.
EVERYTHING AMAZING BY INWOG
inwog, publisher of 407 World of Goo levels since 2009-2015
It's same problem like "can two ALCs be used in one level". "custom event" is code executed in every step, so you always can add more instructions.
Author of Platforms of Goo and 64 levels for World of Goo .
Please give me an example.
EVERYTHING AMAZING BY INWOG
inwog, publisher of 407 World of Goo levels since 2009-2015
To merge fallin bombs code with bit-balloon write:
You can use water with any codes using:
Author of Platforms of Goo and 64 levels for World of Goo .
Interesting... This is more innovative!
EVERYTHING AMAZING BY INWOG
inwog, publisher of 407 World of Goo levels since 2009-2015
Interesting is vertical wrap with water
Author of Platforms of Goo and 64 levels for World of Goo .
That would be weird and more of a supernatural world that the world doesn't exists.
EVERYTHING AMAZING BY INWOG
inwog, publisher of 407 World of Goo levels since 2009-2015