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 09-13-2010, 10:23 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Two questions.

First Question:

Is there any way besides actionprojectile2() to cause something to happen when a projectile hits something? actionprojectile2() apparently cannot seem to differentiate between different projectiles. Say, If i want my projectile to explode when it hits a wall, actionprojectile2 will cause EVERY projectile to explode when it hits a wall. regardless of who shot it. And, since from what I understand, that there's currently no ways to find a projectile's id, generating a random number between 0 and 999999999, putting it in the projectile's params and copying it into a this.var, then putting if(params[whatever] == this.randval){blah;} still seems to trigger on every projectile. is there a way to find the id of the projectile yet? or is there a better function or method i should know about?

Second Question:

In one of my NPCs, I have it set so the players use a custom idle gani based on what weapon the have equipped. but when I tried it with another player, the custom idle gani seemed to only show clientside, and the regular idle animation was showed to everyone else (e.g. player A sees themself using the custom gani, but player B sees player A with the regular idle gani, and vice-versa) But from what I understand, such ganis should be globally viewable. what would normally cause this to happen?

Bonus Question: Remember that old function reflectarrow? I don't suppose there're any functions like that that work with shoot() projectiles are there?
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
  #2  
Old 09-13-2010, 10:31 PM
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
1. You can use setshootparams() to change the parameters that are called when the projectile hits so you can differentiate the exploding projectiles from others.

2. I don't see why you'd have that problem you should be using: replaceani("idle", "newidle");

3. Use setshootparams, and re-calculate where to shoot it back to based on your parameters.
__________________
Quote:
Reply With Quote
  #3  
Old 09-13-2010, 11:26 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Quote:
Originally Posted by fowlplay4 View Post
1. You can use setshootparams() to change the parameters that are called when the projectile hits so you can differentiate the exploding projectiles from others.
I was doing that before, but it looks like it needed more tweaks. I've got it working now, but it strikes me as a bit more convoluted than it needs to actually be. I do hope Stefan incorporates a better alternative soon. (if not already in v6)

Quote:
Originally Posted by fowlplay4 View Post
2. I don't see why you'd have that problem you should be using: replaceani("idle", "newidle");
I had been setting the gani to the alternative instead based on the player's weapon. I tend to avoid setani in the past to avoid problems in case something doesn't switch back. But I'll give this a shot.

Quote:
Originally Posted by fowlplay4 View Post
3. Use setshootparams, and re-calculate where to shoot it back to based on your parameters.
There was this trick i found out where you could use reflectarrow on all of the arrows in the area over and over. it make it seem like a time stop or something so it was neat. But perhaps I may be able to chop together some kind of way to emulate that.

Thanks for the help
__________________
MY POSTS ARE PRONE TO EDITS!
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:26 PM.


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