New Dev File: Teleporting Monsters!
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!
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!
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(¤t_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.
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(¤t_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.
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.
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.
This looks like fun nice to see new files good job
Actually scrap that about spawn being better - I don't think you can pass extra parameters that way
No, no you cannot What I ended up using was external and then a script_attach(1000); , which has much the same effect.