Jump to content


Photo

what am I doing wrong?


  • Please log in to reply
7 replies to this topic

#1 CheeseN1P

CheeseN1P

    GMC Member

  • GMC Member
  • 36 posts
  • Version:GM:Studio

Posted 06 July 2012 - 04:00 PM

I downloaded game maker last night and so far this is what I've cranked out. I have 0 exp with any of it, and I'm really frustrated that I cannot get these zombies to mindlessly mill about, then when I come near, have them chase me, while still running with the walls and stuff. I feel like im on the right track, but I cant figure this one out. and hopefully my first timers code isn't too awful.

I had it really close, then I added the chasing script.

http://www.filedropp...lozombieworld_1

^fixed link

Edited by CheeseN1P, 06 July 2012 - 04:05 PM.

  • 0

#2 mrokke96

mrokke96

    GMC Member

  • New Member
  • 256 posts
  • Version:GM8

Posted 06 July 2012 - 04:07 PM

i cant download the file... so i make some suggestions without looking at what you've got
try something like this
//Create Event
alert = false;

//In Step event
if distance_to_object(PutYourPlayerNameHere) < 200
{
   alert = true
}
else
{
   alert = false;
}

if alert = true
{
   // Put your chase code or script here...
}

if your chasing script does not work, one simple way to make one is:
mp_potential_step_object(obj_player.x,obj_player.y,2,obj_wall)

Edited by mrokke96, 06 July 2012 - 04:14 PM.

  • 0

#3 psycho666

psycho666

    GMC Member

  • GMC Member
  • 831 posts
  • Version:GM8

Posted 06 July 2012 - 04:11 PM

I downloaded game maker last night and so far this is what I've cranked out. I have 0 exp with any of it...


Before you go for your own project, it might be a good idea to check this link out: CLICK
mrokke96, notice the first sentence. I doubt he/she knows GML yet...
  • 0

#4 CheeseN1P

CheeseN1P

    GMC Member

  • GMC Member
  • 36 posts
  • Version:GM:Studio

Posted 06 July 2012 - 04:16 PM

if your chasing script does not work, one simple way to make one is:

mp_potential_step_object(obj_player.x,obj_player.y,2,obj_wall)


This is what i'm doing, the problem is its making the zombies not give 10 cents about the walls. here is my collision stuff i wrote.

if direction = 90 && !place_meeting(x,y-5, solid_obj)
{
    sprite_index = zombie_up;
    image_speed = .3;
    script_execute(see_player)
}
if direction = 90 && place_meeting(x,y-5, solid_obj)
{
    sprite_index = zombie_up;
    image_index = 0;
    image_speed = 0;
    speed = 0;
    script_execute(see_player)
}

and the random milling about is Drag and drop, no real clue on how to make the zombies roam around.




I downloaded game maker last night and so far this is what I've cranked out. I have 0 exp with any of it...


Before you go for your own project, it might be a good idea to check this link out: CLICK
mrokke96, notice the first sentence. I doubt he/she knows GML yet...


Yeah I did a few of them already now. the maze one is what kinda turned into hey lets add zombies!

Edited by CheeseN1P, 06 July 2012 - 04:18 PM.

  • 0

#5 mrokke96

mrokke96

    GMC Member

  • New Member
  • 256 posts
  • Version:GM8

Posted 06 July 2012 - 04:17 PM

is this platform or top down??
psycho666: well i read the last sentence, he/she made a script
  • 0

#6 CheeseN1P

CheeseN1P

    GMC Member

  • GMC Member
  • 36 posts
  • Version:GM:Studio

Posted 06 July 2012 - 04:26 PM

is this platform or top down??
psycho666: well i read the last sentence, he/she made a script


its top down, Im a guy, and whats a better file hosting site I can use, just so you can tell me how bad at coding I am :P
  • 0

#7 psycho666

psycho666

    GMC Member

  • GMC Member
  • 831 posts
  • Version:GM8

Posted 06 July 2012 - 04:37 PM

I made a wrong assumption... Sorry...
  • 0

#8 CheeseN1P

CheeseN1P

    GMC Member

  • GMC Member
  • 36 posts
  • Version:GM:Studio

Posted 06 July 2012 - 04:46 PM

I made a wrong assumption... Sorry...


for what? nothing to be sorry about mate!
I appreciate you trying to help, and honestly your advice is good advice, I should learn more, I did kinda dive in, but I've been picking it up pretty quick! (I think anyways)

on topic, Ive started fixing the Drag and drop portion of the movement, with that I will probably be more able to do this correctly. the only issue is with

Motion_set(dir,speed)

what do I fill in for dir to get a random number? also my collision method is super situational since i'm giving them full 360 degrees, I looked at a few top down tuts here on the forums, but nothing is seeming to deal with collision, just shooting and chasing.

Edited by CheeseN1P, 06 July 2012 - 04:51 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users