I want to make a bow or crossbow that would shoot arrows damaging monsters.
I made a crossbow that shoots arrows in the right direction to me, he's got the charges, that's all good.
Click here to view the secret text
×
Each use Summon
Imperative 1
Disappear
Imperative 12
Wait for player to touch me
Equipment 0,3,20033
Set var "_X" = _MyX
Set var "_Y" = _MyY
Imperative 11
End
Label Summon
If ...
Wait until var "Arrows"> 0
Set var "_MyScriptX" = _X + (_O % 3 ) -1
Set var "_MyScriptY" = _Y + (_O / 3 ) -1
Set var "_MyScriptW" = -9999
If ...
Wait for item Wall, 0,0,0,0
Go to Skip
If End
...
If ...
Wait for item Hot tile, 0,0,0,0
Go to Skip
If End
If ...
Wait for entity Monster 0,0,0,0
Go to Skip
If End
If ...
Wait for entity NPC 0,0,0,0
Go to Skip
If End
Set var "_MyScriptW" = _O
Generate entity Arrow, 0,0, northwest
Ambient sound at 0,0,10212,0
Set var "_MyScriptX" = -9999
Set var "_MyScriptY" = -9999
Set var "_MyScriptF" = -9999
Set var "Arrows" - 1
If End
Label Skip
Set var "_MyScriptX" = -9999
Set var "_MyScriptY" = -9999
Set var "_MyScriptF" = -9999
Label Loop
Created "
Arrow"
This arrow properly "
fly"
around the room, regularly gets stuck in the doors and burned on a hot tiles. My arrow can interact with the position in which it is: if the arrow crosses the position, for example, (2,2), then it works, if for example (2,2) - this is a hot tile. But how to use the arrow to the monster, mirror, etc., which are on the adjacent square with an arrow, I did not understand.
Click here to view the secret text
×
Behavior 15
Imperative 1
If ...
Appear
Else
End
If End
Imperative 9
Label Loop
Set var "_MyScriptX" = (_MyO%3)-1
Set var "_MyScriptY" = (_MyO/3)-1
If ...
Move 0,0,1,0
Else
Disappear
If End
Set var "_MyScriptX" = _MyX
Set var "_MyScriptY" = _MyY
If ...
Wait for item Hot tile,0,0,0,0
Ambient sound at 0,0,10207,0
Disappear
Imperative 4
If End
If ...
Wait for item Bomb,0,0,0,0
Activate item at 0,0
Disappear
Imperative 4
If End
If ...
Wait for item Yellow door,0,0,0,0
Disappear
Imperative 4
...
If ...
Wait for item Tar gate,0,0,0,0
Disappear
Imperative 4
If End
???
???
???
If End
Go to Loop
I would appreciate if someone can help!