- Game Maker Community
- → Viewing Profile: Posts: Chilisoup
Chilisoup
Member Since 26 Jul 2008Offline Last Active Apr 26 2011 11:22 PM
Community Stats
- Group New Member
- Active Posts 26
- Profile Views 1114
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
0
none
Posts I've Made
In Topic: Mobs of zombies
26 April 2011 - 07:34 PM
Thank you very, very much Nocturne, im going to look into your examples for wandering AI.
In Topic: Mobs of zombies
26 April 2011 - 07:17 PM
okay. So I only have one room at this time, so because of my lack of understanding of gml, I put 'break' in before If global.night range = 300 else range = 200, and it solved the variable initializing problem. But the zombies are no longer present :/
In Topic: Mobs of zombies
26 April 2011 - 07:02 PM
I implemented all the codes you told me to, and it still comes up with an error message in obj_reds create event:
___________________________________________
ERROR in
action number 1
of Create Event
for object obj_red:
Error in code at line 4:
if global.night range=300 else range=200; //get the range to check...
^
at position 12: Unknown variable night
Which is silly, because I have my 'obj_time' object in the room, and here is it's codes
'obj_time' Create Event
'obj_time' Step Event
___________________________________________
ERROR in
action number 1
of Create Event
for object obj_red:
Error in code at line 4:
if global.night range=300 else range=200; //get the range to check...
^
at position 12: Unknown variable night
Which is silly, because I have my 'obj_time' object in the room, and here is it's codes
'obj_time' Create Event
Spoiler
global.minutes = ceil(random(60))
global.hours = ceil(random(24))
global.days = 1
global.night = false
alarm[1] = 30
{
if global.hours >=20 || global.hours <=8
global.night = true
}
global.hours = ceil(random(24))
global.days = 1
global.night = false
alarm[1] = 30
{
if global.hours >=20 || global.hours <=8
global.night = true
}
'obj_time' Step Event
Spoiler
if global.minutes >= 60 //60 minutes in one hour
{
global.hours += 1
global.minutes = 0
}
if global.hours = 24 //24 hours in one day
{
global.days +=1
global.hours = 0
}
if global.hours >=20 || global.hours <= 8 //Checks if it is Daytime or Nighttime
{
global.night = true
with (obj_Red)
{
if global.Night range=300 else range=200;
}
}
else
{
global.night= false
}
{
global.hours += 1
global.minutes = 0
}
if global.hours = 24 //24 hours in one day
{
global.days +=1
global.hours = 0
}
if global.hours >=20 || global.hours <= 8 //Checks if it is Daytime or Nighttime
{
global.night = true
with (obj_Red)
{
if global.Night range=300 else range=200;
}
}
else
{
global.night= false
}
In Topic: Top down AI
26 April 2011 - 05:48 PM
you rock! thanks for these examples, they're helping a lot
In Topic: Drawing Sprites with Animation
26 April 2011 - 04:41 PM
You guys are awesome. GPro, your coding did what I wanted after fiddling with ther x and y position of the body, because it appeared a little to the top right of the legs. Im not sure if both sprites are centered, but I do know that they are different sizes, with the body sprite being larger than the legs. Now what if i wanted to take this a little further, and change a sprite. Could you go into a little detail about what that code really means, I'm trying to get a good grasp on gml, but its still a little alien to me. what is 'sprite_get_height'?
Now what about if I JUST want the body sprite face to face my mouse.x and mouse.y ?
Now what about if I JUST want the body sprite face to face my mouse.x and mouse.y ?
- Game Maker Community
- → Viewing Profile: Posts: Chilisoup
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content