Post by sendy on Feb 14, 2015 0:09:30 GMT
So here's my first tip. I am literally completely new to AGD, so this might not be the best way to do it. I'm sure it's also quite trivial to anyone who's good at coding, lol! I wanted to expand horizontal guardians to (a) have arbitrary boundaries and (b) not be limited to patrolling platforms (to create flying enemies, etc).
I use the "custom" block with invisible graphics to act as walls which are solid to the guardians and passable by the player. I can still use customs as conveyor belts and other things in other rooms, provided I don't use them as guardian barriers on the same screen. I also made the enemy turn around when it hits a static nasty, such as a spike on a platform, because I think it looks better. Finally, I removed the code which checks for holes in platforms, as this causes a guardian to freeze in mid-bowel relaxant, which is no good for my needs
This is the modified "horizontal guardian" preset and probably obvious to most people, but some may found it useful and I thought it was pretty neat. (To be honest it was the first programming I did with AGD and I was totally suprised it worked - a testimony to the brilliance of the AGD scripting language!). I'm also using AGD version 3.0 so there may be better ways of doing this in later versions.
IF DEADLY = 1
IF PARAMA = 0
LET PARAMA = 1
ELSE PARAMA = 0
ENDIF
ENDIF
IF CUSTOM = 1
IF PARAMA = 0
LET PARAMA = 1
ELSE PARAM = 0
ENDIF
ENDIF
IF PARAMA = 0
IF CANGOLEFT
SPRITELEFT
ELSE
LET PARAMA = 1
ENDIF
ELSE
IF CANGORIGHT
SPRITERIGHT
ELSE
LET PARAMA = 0
ENDIF
ENDIF
IF A = 0 (A is an optional flip-flop counter to slow down animation)
ANIMATE
ENDIF (optional, see above)
IF COLLISION 0
KILL
ENDIF
Yeah, I know it's simple. But small victories are big victories, I've never had much luck with coding
Hopefully someone finds this useful! Remember to make a placeholder graphic for your "enemy walls" so you can see where you're placing them down.
I also added this routine to the bouncing enemy, so I can box it into certain rooms and it won't go flying everywhere
I use the "custom" block with invisible graphics to act as walls which are solid to the guardians and passable by the player. I can still use customs as conveyor belts and other things in other rooms, provided I don't use them as guardian barriers on the same screen. I also made the enemy turn around when it hits a static nasty, such as a spike on a platform, because I think it looks better. Finally, I removed the code which checks for holes in platforms, as this causes a guardian to freeze in mid-bowel relaxant, which is no good for my needs
This is the modified "horizontal guardian" preset and probably obvious to most people, but some may found it useful and I thought it was pretty neat. (To be honest it was the first programming I did with AGD and I was totally suprised it worked - a testimony to the brilliance of the AGD scripting language!). I'm also using AGD version 3.0 so there may be better ways of doing this in later versions.
IF DEADLY = 1
IF PARAMA = 0
LET PARAMA = 1
ELSE PARAMA = 0
ENDIF
ENDIF
IF CUSTOM = 1
IF PARAMA = 0
LET PARAMA = 1
ELSE PARAM = 0
ENDIF
ENDIF
IF PARAMA = 0
IF CANGOLEFT
SPRITELEFT
ELSE
LET PARAMA = 1
ENDIF
ELSE
IF CANGORIGHT
SPRITERIGHT
ELSE
LET PARAMA = 0
ENDIF
ENDIF
IF A = 0 (A is an optional flip-flop counter to slow down animation)
ANIMATE
ENDIF (optional, see above)
IF COLLISION 0
KILL
ENDIF
Yeah, I know it's simple. But small victories are big victories, I've never had much luck with coding
Hopefully someone finds this useful! Remember to make a placeholder graphic for your "enemy walls" so you can see where you're placing them down.
I also added this routine to the bouncing enemy, so I can box it into certain rooms and it won't go flying everywhere