Spider balls?

I’m trying to get something to shoot balls in the direction it’s facing, like a spider, but shootball doesn’t take a direction. Am I stuck using arrows or fireballs instead? :confused:

Could always dress up the octopus baddy

Eh? Well, I was going to have it move differently… :J

Or just use a projectile(shoot) instead.

Eh? In my documentation, the only shooting-related things are:

Am I missing something? I suppose I could use another npc, but that seems… messy.

Newfeatures2002.txt
Graal 2.1.7.1 & 2.2.2.0

- new script command 'shoot' for shooting projectiles: shoot x,y,z,angle,zangle,power,gani,ganiparams; x,y and z - specify the starting position angle - shoot angle (when looking from the top): east is 0, north 3.14/2, west is 3.14, south 3.14*3/2) zangle - the angle in vertical direction, 0 means the projectile is shoot horizontal, 3.14/2 means straight to the sun power - the shoot power which is used to shoot the projectile; if it's 0 then the projectile is shoot like an old arrow (doesn't fall down, moves 20 tiles each second) gani - the animation that is used for the projectile; the animation can be multidirectional, the engine automatically selects the best direction for the flying direction; the animation can have 1 step (not animated) or 7 steps, then the engine is automatically choosing the good animation step for the projectile flying angle - when its raising then step 1 is taken, when flying horizontal it is step 4, when it is short before the impact then the engine displays step 7 When the projectile is landing or hitting an object then some actions are triggered. With the command 'setshootparams <params>;' you can set the parameters that the called scripts get, call 'setshootparams' before shooting the projectile. Client-side events: - actionprojectile: is triggered when a projectile lands on the player/npc, in #p(0), #p(1) etc. you have the parameters set with the command setshootparams Server-side events: - actionprojectile: is triggered when a client has used the 'shoot' command to shoot a projectile and the projectile is landed; in #p(0) and #p(1) you have the x and y position of the impact in case you want to place an explosion or similar things on the ground (the control-npc is automatically warped to the level where the impact happened); #p(2),#p(3) etc. contain the params set with 'setshootparams' (before shooting the projectile) - actionsprojectile: is triggered when a server-side script has shot a projectile and the projectile is landed; in #p(0) and #p(1) you have the x and y position of the impact (the control-npc is automatically warped to the level where the impact happened); #p(2),#p(3) etc. contain the params set with 'setshootparams' (before shooting the projectile) Projectiles are easy to use and don't take a lot of bandwidth because only the shooting of the projectile needs to be sent, the movement is calculated on the different computers. The projectile is flying like a heavy object thrown through the air: the horizontal movement speed keeps the same (moves horzspeed=cos(zangle)*speed tiles all 0.05 seconds), the vertical speed is initialized as vertspeed=sin(zangle)*speed and is decreased by 0.1 all 0.05 seconds; then the new position (calculated all 0.05 seconds) is newx = x + cos(angle)*horzspeed, newy = y - sin(angle)*horzspeed, newz = z + vertspeed

Graal 2.1.7.1 only

- when a projectile lands then the client-side can do effects now too, all weapon scripts can catch the event with if (actionprojectile); the first two paramters (#p(0) and #p(1)) contain the position of the impact, #p(2) etc. are the normal parameters which you have specified with setshootparams before shooting the projectile
Graal 2.2.2.0 only (Previous was updated)- when a projectile lands then weapons get the event 'actionprojectile2' instead of 'actionprojectile' to avoid problems of mixing those ('actionprojectile' is called when the projectile hits an npc or the player)

Oh, it’s hidden in the changelog. No wonder I couldn’t find it! Thanks, it looks like this is able to do what I want! :slight_smile:

Graal 2.2.2 behaviour ftw