Raised This Month: $51 Target: $400
 12% 

[TF2] Spell casting!


Post New Thread Reply   
 
Thread Tools Display Modes
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 11-01-2013 , 15:47   Re: [TF2] Spell casting!
Reply With Quote #21

I believe you need gamedata to set velocity on some objects properly. I had to do this to get physprops and projectiles to update properly for my portal mod. This may be similar, without it, the projectiles wouldnt move. My problem though was getting the velocity out of the physprop, not teleporting it. I think it was GetSmoothedVelocity. You may want to check if projectiles are using so ething different.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-01-2013 , 18:51   Re: [TF2] Spell casting!
Reply With Quote #22

Quote:
Originally Posted by friagram View Post
I believe you need gamedata to set velocity on some objects properly. I had to do this to get physprops and projectiles to update properly for my portal mod. This may be similar, without it, the projectiles wouldnt move. My problem though was getting the velocity out of the physprop, not teleporting it. I think it was GetSmoothedVelocity. You may want to check if projectiles are using so ething different.
Could i possibly get that offset? haha
Mitchell is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 11-01-2013 , 23:40   Re: [TF2] Spell casting!
Reply With Quote #23

Quote:
Originally Posted by friagram View Post
my portal mod.
Portal mod? For TF2? Do want!
404UserNotFound is offline
RavenShadow
Junior Member
Join Date: Jan 2013
Old 11-02-2013 , 12:40   Re: [TF2] Spell casting!
Reply With Quote #24

From looking at http://www.sourcemodplugins.org/vtableoffsets/tf , the offset for GetSmoothedVelocity is 139 for windows and 140 for linux.
RavenShadow is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-02-2013 , 13:18   Re: [TF2] Spell casting!
Reply With Quote #25

Quote:
Originally Posted by RavenShadow View Post
From looking at http://www.sourcemodplugins.org/vtableoffsets/tf , the offset for GetSmoothedVelocity is 139 for windows and 140 for linux.
-snip-
edit:
Read it wrong, im trying to set the velocity, not get it.

Last edited by Mitchell; 11-02-2013 at 13:21.
Mitchell is offline
bebraham
New Member
Join Date: Nov 2013
Old 11-02-2013 , 16:06   Re: [TF2] Spell casting!
Reply With Quote #26

If you set the velocity after you spawn the spell, it works. (At least for me)
bebraham is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-02-2013 , 18:57   Re: [TF2] Spell casting!
Reply With Quote #27

Quote:
Originally Posted by bebraham View Post
If you set the velocity after you spawn the spell, it works. (At least for me)
If youre talking about the lightning and the firebolt, then yeah, but i cant get transpose and bats to work properly.
Mitchell is offline
bebraham
New Member
Join Date: Nov 2013
Old 11-02-2013 , 20:40   Re: [TF2] Spell casting!
Reply With Quote #28

Quote:
Originally Posted by Mitchell View Post
If youre talking about the lightning and the firebolt, then yeah, but i cant get transpose and bats to work properly.
I'm talking about the transpose teleport. This is how I did it:
Code:
TeleportEntity(iSpell, vPosition, vAngles, NULL_VECTOR);
DispatchSpawn(iSpell);
TeleportEntity(iSpell, NULL_VECTOR, NULL_VECTOR, vVelocity);
bebraham is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 11-03-2013 , 06:40   Re: [TF2] Spell casting!
Reply With Quote #29

Dispatchkeyvaluevector(ent, "origin", vec)

Dispatchspawn

...

Teleportentity ent nv nv vel

Change your vel to be parabolic if you want it to arc.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 11-03-2013 at 06:41.
friagram is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-03-2013 , 16:05   Re: [TF2] Spell casting!
Reply With Quote #30

Quote:
Originally Posted by bebraham View Post
I'm talking about the transpose teleport. This is how I did it:
Code:
TeleportEntity(iSpell, vPosition, vAngles, NULL_VECTOR);
DispatchSpawn(iSpell);
TeleportEntity(iSpell, NULL_VECTOR, NULL_VECTOR, vVelocity);
Thanks, ill look into getting the rest of the spells out.
Mitchell is offline
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 -4. The time now is 21:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode