Pages: 1
Topic closed
Hi there, i am making a project at the moment which has the player use magic to stop any enemies touching them.
One of the spells is Wind, which theoretically should blast the enemies backwards but the enemy is already gliding 5 seconds to the player's position and it does this instead of being blasted backwards.
Is there any way to stop this from happening?
I will appreciate any help, even if it is "give up now"
~Willpower
Last edited by Willpower (2013-01-02 08:09:45)
Offline
I would like to help so, could you either type out the magician's scripts as well as the enemies scripts in or upload the project - that would help.
< >
The main problem I can 'see' from my 'view' is to replace the
glide to x (x position) y (y position) for (0) secs. Rather let your enemy
point towards [player v] move(your amount) steps wait (wanted delay time) secs//to calculate how long it will take to get at the sprite simply do this ((distance to player / steps moved)* time delay)For your player:
when gf clicked forever set x to (your x position) set y to (your y position) if <(mouse down?)> broadcast [attack v] and wait end endThen when you attack in the enemy's scripts
when i recieve [attack v] if <([abs v] of (distance to [player v])) < (desired range)> point towards [player v] move((desired range)*[-1]) steps endHope this helps
Last edited by Ideas (2013-01-02 10:02:58)
Offline
Magicians Scripts- basically the spell which you type in is the spell that is cast- the magician does not move at the moment unless you cast the "Teleport" spell
The enemy "Skeleton" scripts
I know roughly what you are saying and i thought the glide was the problem but the desired range is confusing me and since the skeleton can start from 8 different positions i think your solution will not work. I should of put these scripts up to start with
Offline
Willpower wrote:
Magicians Scripts- basically the spell which you type in is the spell that is cast- the magician does not move at the moment unless you cast the "Teleport" spell
http://i49.tinypic.com/20qgefk.gif
The enemy "Skeleton" scripts
http://i47.tinypic.com/wbb1mt.gif
I know roughly what you are saying and i thought the glide was the problem but the desired range is confusing me and since the skeleton can start from 8 different positions i think your solution will not work. I should of put these scripts up to start with
Actually, you didn't need to put all of those scripts because this doesn't involve all of them. And the first half of what Ideas proposed will actually work; just put it after your placement script. The only thing he forgot is a repeat loop around the movement part of the script or else it'll run once and end. So what you'd need is:
point towards [player v] repeat until (Dead?) if (Allowed to move?)//Not needed. move(your amount) steps wait (wanted delay time) secs//to calculate how long it will take to get at the sprite simply do this ((distance to player / steps moved)* time delay) end end
when I receive [recheck v] if (Should be moving?)//Replace with conditional. glide (5) secs to x: (89) y: (89) else Whatever scripts you want... end
Last edited by ErnieParke (2013-01-02 13:34:48)
Offline
Thank you very much, from your help i have created this script which means it can not move when it is hit by an Iceshard and it gets blasted back when it touches Wind or a Windshield
Requesting to be closed
Last edited by Willpower (2013-01-02 14:39:46)
Offline
Closed by request of the topic owner.
Offline
Topic closed
Pages: 1