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 05-04-2010, 09:44 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Projectile Gani Script position?

I'm trying to script a smoke trail effect for a projectile that is shot using shoot(). I'm doing this in a gani script for the projectile gani.

Originally I was just using TShowImg's inside the gani script, but those would immediately disappear once the projectile hit, which didn't look pretty. So I handled all the image showing in a WNPC that would fade the images out and handle destroying them, and the gani script would just call a public function in that WNPC.

However, when doing that it would show the images at the projectiles shadow, rather than it's actual position...it wouldn't account for the z-axis and I have yet to find a way to do this. The objects z is always 0, so I can't manually subtract that from the y position. This is made especially strange since when creating the TShowImg's in the gani script and setting the x/y in there would account for the z-axis, but not otherwise.

This is extremely frustrating, as it makes doing this in an acceptable way...impossible.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #2  
Old 05-04-2010, 09:55 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
player.z should work just fine.
Reply With Quote
  #3  
Old 05-04-2010, 11:32 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally Posted by coreys View Post
I'm trying to script a smoke trail effect for a projectile that is shot using shoot(). I'm doing this in a gani script for the projectile gani.

Originally I was just using TShowImg's inside the gani script, but those would immediately disappear once the projectile hit, which didn't look pretty. So I handled all the image showing in a WNPC that would fade the images out and handle destroying them, and the gani script would just call a public function in that WNPC.

However, when doing that it would show the images at the projectiles shadow, rather than it's actual position...it wouldn't account for the z-axis and I have yet to find a way to do this. The objects z is always 0, so I can't manually subtract that from the y position. This is made especially strange since when creating the TShowImg's in the gani script and setting the x/y in there would account for the z-axis, but not otherwise.

This is extremely frustrating, as it makes doing this in an acceptable way...impossible.
Wouldn't it be possible to accomplish this with the particle system and the 'continueafterdestroy' boolean?
Reply With Quote
  #4  
Old 05-04-2010, 04:28 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by Riot View Post
Wouldn't it be possible to accomplish this with the particle system and the 'continueafterdestroy' boolean?
Yes.
Reply With Quote
  #5  
Old 05-04-2010, 06:44 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Particle effects are not working well for this, by the time it starts emitting the projectile is about to land.

Quote:
Originally Posted by DustyPorViva View Post
player.z should work just fine.
Why did that work o.O player refers to the projectile in a projectile gani?
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #6  
Old 05-04-2010, 07:25 PM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Quote:
Originally Posted by coreys View Post
Why did that work o.O player refers to the projectile in a projectile gani?
When I was using a gani script to display health on an NPC, I had to use player.attr[] instead of this.attr[]

No clue why, but it works
Reply With Quote
  #7  
Old 05-04-2010, 08:59 PM
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
Quote:
Originally Posted by coreys View Post
Particle effects are not working well for this, by the time it starts emitting the projectile is about to land.


Why did that work o.O player refers to the projectile in a projectile gani?
In gani scripts, the player object refers to the object that the gani is being set to.
Reply With Quote
  #8  
Old 05-04-2010, 09:59 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by DustyPorViva View Post
In gani scripts, the player object refers to the object that the gani is being set to.
Good to know, thanks
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #9  
Old 05-05-2010, 04:41 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally Posted by coreys View Post
Particle effects are not working well for this, by the time it starts emitting the projectile is about to land.
Well, you could call emitter.emit() to force an emission right away to see if that helps. You can also set the min/max delay to a really high number and just forcefully call it at the speed you want.

Last time I wanted an effect like this I used particles and even for short-lived ones it worked fairly well.
Reply With Quote
  #10  
Old 05-05-2010, 06:55 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by Riot View Post
Well, you could call emitter.emit() to force an emission right away to see if that helps. You can also set the min/max delay to a really high number and just forcefully call it at the speed you want.

Last time I wanted an effect like this I used particles and even for short-lived ones it worked fairly well.
Yeah, calling emit() worked about the same.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #11  
Old 05-05-2010, 06:39 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by Riot View Post
You can also set the min/max delay to a really high number
Or set emitautomatically to false.
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 11:28 PM.


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