The Dink Network

New Dev File: Teleporting Monsters!

November 17th 2012, 02:00 PM
dinkdead.gif
Mr geraldsummer has made a small file that gives monsters the ability to teleport straight to Dink while chasing him.

Teleporting Monsters! is the first part of his Modular Mob Modification Systems where the idea is to add just a few lines of code to the scripts of existing mob's scripts to get them to behave differently.

Should be interesting!

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.

November 17th 2012, 08:51 PM
pq_thinger.gif
Many thanks Sparrowhawk

As of this moment I have solved the problem and will be sending over the updated version the moment I can be bothered to go back through and recomment everything.
November 17th 2012, 11:20 PM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
This looks like fun nice to see new files good job
November 18th 2012, 05:46 AM
dinkdead.gif
Actually scrap that about spawn being better - I don't think you can pass extra parameters that way
November 18th 2012, 03:55 PM
pq_thinger.gif
No, no you cannot What I ended up using was external and then a script_attach(1000); , which has much the same effect.