Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-26-2011, 01:36 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
doing something after shoot

Hey guys I was just messing around with the shoot command.

Now I used the projectile with the gravity and wanted to ask how i could make it like if the projectile hits the floor again, the player will do something, like say something. I already tried like adding:
PHP Code:
shoot(player.xplayer.yplayer.z+1temp.angletemp.zangletemp.power"callipumppetidle""callipumppet.png");
if (
this.z<=0) {
  
player.chat="YAY";

but the player will just say "YAY" when I fire it, not when it lands
Reply With Quote
  #2  
Old 02-26-2011, 01:48 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
When a projectile hits the ground it calls onActionProjectile2(x, y, param0, param1, ...), if it's the player it calls onActionProjectile(param0, param1, ...).

I.e:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
setshootparams(player.nick);
  
shoot(player.xplayer.yplayer.z+1temp.angletemp.zangletemp.power"callipumppetidle""callipumppet.png");
}

function 
onActionProjectile(param) {
  
onActionProjectile2(player.xplayer.yparam);
}

function 
onActionProjectile2(pxpyparam) {
  
player.chat "Yay" SPC param "!";

__________________
Quote:
Reply With Quote
  #3  
Old 02-26-2011, 01:49 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
oh ok thx
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.