Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-07-2007, 04:00 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Shoot(); problems

Alright messing around with shoot for the first time in awhile and I get it to display but the gani disappears after one sec it seems. OnActionProjectile is never called.

PHP Code:
//#CLIENTSIDE
function onWeaponFired() 
{
  
freezeplayer0.45);
  
setShootParamsthis.xthis.y);

  
temp.angle getanglevecxplayer.dir), vecyplayer.dir));

  
shoot(player.xplayer.yplayer.ztemp.angledegtoRad22.5), random0.5,0.8), "omega_ol_tomahawk"NULL);

  
setAni"kick"NULL);
  
sleep0.45);
  
setAni"idle"NULL);
}

function 
onActionProjectile() 
  
putLeaps4params0], params1]); 
__________________
Deep into the Darkness peering...
Reply With Quote
  #2  
Old 07-07-2007, 04:29 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Hmm, check if the ani has multiple frames? I believe shoot changes the ani's frame depending on how far along the projectile is finished its trajectory.

But after messing with what you gave, I think it has a lot to do with the power and zangle you provided. Maybe try changing those?
Reply With Quote
  #3  
Old 07-07-2007, 04:31 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
the ani does have multiple frames and is looped, I tried messing with the zangle and power but I had had no luck.
__________________
Deep into the Darkness peering...
Reply With Quote
  #4  
Old 07-07-2007, 04:32 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Well try setting it to a gani that has only a single frame to see if that's the issue. I'm not sure if projectiles will loop the gani.
Reply With Quote
  #5  
Old 07-07-2007, 04:48 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
nope
__________________
Deep into the Darkness peering...
Reply With Quote
  #6  
Old 07-07-2007, 04:50 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Then it's definitely the zangle and power. Raise those both up.
Reply With Quote
  #7  
Old 07-07-2007, 04:53 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
k, but when I do the particle usually goes flying way off the level, any good estimated ranges I should put those?
__________________
Deep into the Darkness peering...
Reply With Quote
  #8  
Old 07-07-2007, 05:01 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
It all depends on what kind of trajectory you're trying to accomplish.
For the zangle, remember it's the initial angle it's 'thrown' at. pi/2 is being thrown straight up, while 0 is basically nothing(only works with 'classic-type' projectiles). As for the power... try starting with 1 and working your way around that.
Reply With Quote
  #9  
Old 07-07-2007, 05:04 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
ok it looks like it falls and hits the ground but onActionProjectile is not called.
__________________
Deep into the Darkness peering...
Reply With Quote
  #10  
Old 07-07-2007, 05:37 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Should use {}'s for the function, also, why are you passing the NPC's x/y in the params?
Reply With Quote
  #11  
Old 07-07-2007, 05:48 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
I think it detects where the shoot projectile landed, also if there is just one command after the function you dont need the {}'s
__________________
Deep into the Darkness peering...
Reply With Quote
  #12  
Old 07-07-2007, 01:10 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
On clientside you only get onactionprojectile2 i think, not sure
Reply With Quote
  #13  
Old 07-07-2007, 04:09 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Use continuous in the gani.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #14  
Old 07-07-2007, 09:49 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by Stefan View Post
On clientside you only get onactionprojectile2 i think, not sure
It recieves the onactionprojectile only when I fire it straight up then lands.

EDIT: Setting it to continuous made it work and add ing onactionprojectile2 made it work aswell thanks guys.
__________________
Deep into the Darkness peering...

Last edited by Angel_Light; 07-07-2007 at 10:38 PM..
Reply With Quote
Reply


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 07:17 PM.


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