The Dink Network

Reply to Re: New Dev File: Teleporting Monsters!

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
November 17th 2012, 02:21 PM
dinkdead.gif
Love the idea of MMMs

A couple of things about this one:
When hit, a monster will teleport to Dink even if Dink is not the target. Maybe pass the target sprite as an extra parameter unless this is intended?

By checking if there is a target, you could also then put it in the main procedure instead of hit if you wished. That way enemies who target Dink by default even without being hit, eg some pillbugs, would be able to teleport straight away.
I assume sp_target(&current_sprite, -1) returns 0 if there is no target but I haven't checked.

Another thing is that using spawn may be better than external in this case. It probably doesn't make much difference but it will save running into possible bugs because of external stopping the calling script while the infinite loop runs.