#Help with increasing enemy aggression/speed

22 messages · Page 1 of 1 (latest)

grand oriole
#

I'm making a game for a final project for class and i need help with coding the enemy's aggression. When the collects more of a certain item, i need the enemy's speed/aggression to slowly increase and my professor never taught us how to do that and is basically refusing to show me how to do so. If anyone can please help me i'd really appreciate it.
I have to make a slender man themed game for my final, so as the player finds each note i need the slender man's speed to increase a little bit each time.
i don't have any code for that cuz literally idk how or what to even write since my professor never taught my class how to do something like this.
i'm sorry if you really have to dumb things down for me cuz i barely know to code stuff in game maker, he solely showed us how to do everything he taught us in visual instead of code.

Also, i had to make all 8 notes into separate objects cuz when the player collects them it takes them to a separate screen/room to read what the note says, then it takes them into the next room to find the next note
Again sorry if this is very inefficient but this is how my professor wants us to do it and this is the only way he taught us how to do so

Here's all the code for my "slender man" and one of my "notes" (all the notes have the same exact code):

vapid fjord
#
//gordon

//Create
walk_spd = 2 //declare the walk_spd as a variable

//Alarm 0
path_start(path, walk_spd,0,0) //walk on the path with that speed


//Paper collision with player
gordon.walk_spd +=1 //or however much you want to increase the walk_spd
//the . lets you access and call on variables from other objects

global.papers_collected +=1 //probably have some kinda score tracking thing? that goes in here too

instance_destroy()
grand oriole
vapid fjord
#

depends

#

that's your score system

#

so hwoever you have scores set up, that's where that goes to update your score

#

global.papers_collected+=1 is just example code

#

if you don't have a score system, and just want gordon to move faster then you can omit it

grand oriole
#

also i had an error message pop up

#

i know i most likely coded this wrong into my notes code

grand oriole
vapid fjord
#

show me gordon's code again?

#

did you do this stuff?

grand oriole
vapid fjord
#

consistent variable names

grand oriole
#

bruuhh i'm dumb

grand oriole