Yeah I'm trying to make it so that if something happens to one obj_grass, then all of the other obj_grass in that area will be affected as well so I am trying to have it check for every obj_grass inside one square area of the field which actually, I just realized even if my code works it will not work how I want it to..
basically I want it to be like:
OOOOOOOOOOOO
OXXXXXOXXXXXO
OXXXXXOXXXXXO
OOOOOOOOOOOO
The X's on the left should act like one group and the X's on the left should act like another independent group. But I can't find any way to do this... Now my code will screw up if the grass will look like this:
OOOOOOOOOOOOOO
OXXXXOOOXXXXXXO
OOOXXXXXXXOOOO
OOOOOOOOOOOOOO
Because I have it checking from top left across the whole row, then move down return to the left and check across, then move down return left and check across... So my code won't even work correctly.. But thatnks for trying to help anyway!
Sincerely,
R10t--
- Game Maker Community
- → Viewing Profile: Posts: R10t--
R10t--
Member Since 15 May 2011Offline Last Active Nov 29 2012 01:31 AM
Community Stats
- Group GMC Member
- Active Posts 182
- Profile Views 2349
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
Posts I've Made
In Topic: Script for checking adjacent area
15 July 2012 - 06:01 PM
In Topic: Split an object?
13 July 2012 - 01:03 AM
Hmm, alright, thanks, that actually might work
thanks
Sincerely,
R10t--
Sincerely,
R10t--
In Topic: Split an object?
13 July 2012 - 12:52 AM
Never thought about tiles, that looks pretty easy to do but is it possible say to start out with an area of pure grass that have a variable of say 'health=100' that decreases if something happends so say a dog come and poops on the grass then 'health-=5' or something. (I know this is possible)
BUT
Is it possible to have the player build a walkway that splits the one big area of grass into two sections so that if a doog poops on one side of the area then only that side of the grass will get decreased?
so left side 'health=95' and right side 'health=90' after the dog has pooped on the right side?
(and the big area of grass to start with will not always be split in a straight line)
BUT
Is it possible to have the player build a walkway that splits the one big area of grass into two sections so that if a doog poops on one side of the area then only that side of the grass will get decreased?
so left side 'health=95' and right side 'health=90' after the dog has pooped on the right side?
(and the big area of grass to start with will not always be split in a straight line)
In Topic: Split an object?
13 July 2012 - 12:33 AM
Alright, that may come in handy, but I want to know if I have to create multiple sprites of the object for where it would be split? Because I'm making it like a grassy area and the player can place pathways down on the grass, and if the grass can be split in to two different unique sections then it would automatically split them keeping the variables.
Another possibility that I could do is have a ton of small small objects that make up the whole grass area that 'act' as a unit when they are not separated by a 'path' is that possible?
Another possibility that I could do is have a ton of small small objects that make up the whole grass area that 'act' as a unit when they are not separated by a 'path' is that possible?
In Topic: Skill Bar problems
13 July 2012 - 12:05 AM
For moving the 'Inferface' you can say:
as for the 'cooldown'
make a global variable called "global.selected" or something and when pressing '1' on the keyboard say:
[code=auto:0]
if global.selected="fire"
{
image_index=1 (or whichever image was grey)
}
else
{
image_index=0 (or whichever one was colored)
}
Sincerely,
R10t--
if /*button to move your player right*/ =true
{
x+=1 (or the speed your player moves at)
}
if /* the ubtton that moves your player left*/ =true
{
x=-1 (or the speed your player moves)
}
as for the 'cooldown'
make a global variable called "global.selected" or something and when pressing '1' on the keyboard say:
global.selected="fire"then in your draw even say:
[code=auto:0]
if global.selected="fire"
{
image_index=1 (or whichever image was grey)
}
else
{
image_index=0 (or whichever one was colored)
}
Sincerely,
R10t--
- Game Maker Community
- → Viewing Profile: Posts: R10t--
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content