Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Unreg & Reg:Simple Zelda Style Trap Engine Code Released!  (Read 883 times)

0 Members and 1 Guest are viewing this topic.

Koh

Unreg & Reg:Simple Zelda Style Trap Engine Code ...
« on: December 07, 2006, 10:11:03 pm »
  • Tamer Koh
  • *
  • Reputation: +6/-0
  • Offline Offline
  • Gender: Male
  • Posts: 980
I'm using this in TLoZ:GBMQ2 for the traps, just like in Z1 they go for Link when he is on their x or y axis.  This is the trick to show you how to do it.  (Yes I know its simple, but we have those lazy people that don't feel like doing it.

Create Event
Code: [Select]
moving=0
placing=1

Step Event
Code: [Select]
if(objLink.x=x or objLink.y=y && !moving){
sound_play(Shoot)
move_towards_point(objLink.x,objLink.y,3)
moving=1
}
if(moving && x=xstart or y=ystart && !placing){
move_towards_point(x,y,0)
moving=0
placing=1
}

Collision with Solid Event
Code: [Select]
if(moving){
sound_play(Chink)
move_towards_point(xstart,ystart,2)
placing=0
}
Logged
  • Megaclipse Games
Re: Unreg & Reg:Simple Zelda Style Trap Engine C...
« Reply #1 on: December 10, 2006, 07:16:16 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2890
Super simple, but a good example :). Maybe you should make a sample GM6 for some people though, I hate copying and pasting from a browser, because the three PCs with internet access that I have do not have an installation of GM6 on it :P. Thank the Holy Goat for flash memory sticks, right?

Although a little code indentation wouldn't hurt, the code is great :). It appears to be adapted to work with Goodnight's movement engine... a nice touch. You should explain the objects, sounds and variables though, in your topic, so people don't just use this code, but learn it, and how it works :).
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.014 seconds with 39 queries.