Raised This Month: $32 Target: $400
 8% 

[Help] Rotate .spr model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
metal_upa
Senior Member
Join Date: Jun 2016
Old 11-15-2019 , 13:55   [Help] Rotate .spr model
Reply With Quote #1

Hi, i'm trying to make something like throwing a thunder bolt using .spr as animate model. But how can i rotate the spr so it can lay down 90 degree. As you can see in the image the spr is stand up LOL.
Thank you.
image


sma

Last edited by metal_upa; 11-15-2019 at 13:56.
metal_upa is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 11-16-2019 , 09:42   Re: [Help] Rotate .spr model
Reply With Quote #2

Check the war3ft mod's code and look for thunder ultimate.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
metal_upa
Senior Member
Join Date: Jun 2016
Old 11-17-2019 , 04:02   Re: [Help] Rotate .spr model
Reply With Quote #3

Quote:
Originally Posted by georgik57 View Post
Check the war3ft mod's code and look for thunder ultimate.
I don't think it use "env_sprites" entity for that, it just a TE_BEAM* temp entity.
metal_upa is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 11-17-2019 , 04:26   Re: [Help] Rotate .spr model
Reply With Quote #4

Personally I would suggest to use Beam Entitites.

Simply create a beam with Beam_Create(const szSpriteName[], const Float: flWidth)
Set start and end origin with Beam_PointsInit(const iBeamEntity, const Float: flVecStart[3], const Float: flVecEnd[3])

And you can detect touch and everything to it.
That's how I did it on my "Tron Legacy' project.


Grtz,
Xalus
__________________
Retired.
Xalus is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 11-17-2019 , 06:42   Re: [Help] Rotate .spr model
Reply With Quote #5

Why do you want to use server sided entities anyway?
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 11-17-2019 , 08:14   Re: [Help] Rotate .spr model
Reply With Quote #6

Quote:
Originally Posted by georgik57 View Post
Why do you want to use server sided entities anyway?
Because if you check his code,
you'll see he wants to detect players touching the beam.
__________________
Retired.
Xalus is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 11-17-2019 , 09:17   Re: [Help] Rotate .spr model
Reply With Quote #7

Afaik the beam entities stock is bugged in that regard. I remember testing it a few years ago.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 11-17-2019 , 11:31   Re: [Help] Rotate .spr model
Reply With Quote #8

Quote:
Originally Posted by georgik57 View Post
Afaik the beam entities stock is bugged in that regard. I remember testing it a few years ago.
Well in the mods I use it, it works just fine.

-EDIT-
If you are going to make not-straight lines
you'll need to play with https://forums.alliedmods.net/showth...ht=beam&page=4 use touch check and the function Emp' made.
__________________
Retired.

Last edited by Xalus; 11-17-2019 at 11:36.
Xalus is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 11-17-2019 , 14:59   Re: [Help] Rotate .spr model
Reply With Quote #9

Quote:
Originally Posted by metal_upa View Post
Hi, i'm trying to make something like throwing a thunder bolt using .spr as animate model. But how can i rotate the spr so it can lay down 90 degree.



How does TE_LIGHTNING work?!
https://forums.alliedmods.net/showpo...8&postcount=14

Use entity_get_vector to have it hold the whatever like aim.
__________________
DJEarthQuake is offline
metal_upa
Senior Member
Join Date: Jun 2016
Old 11-26-2019 , 09:20   Re: [Help] Rotate .spr model
Reply With Quote #10

Quote:
Originally Posted by Xalus View Post
Personally I would suggest to use Beam Entitites.

Simply create a beam with Beam_Create(const szSpriteName[], const Float: flWidth)
Set start and end origin with Beam_PointsInit(const iBeamEntity, const Float: flVecStart[3], const Float: flVecEnd[3])

And you can detect touch and everything to it.
That's how I did it on my "Tron Legacy' project.


Grtz,
Xalus
The reason why i use env_sprite entity because i want an animated sprites that can travel, not instant vecStart and vecEnd origin.

Quote:
Originally Posted by georgik57 View Post
Why do you want to use server sided entities anyway?
The reason why i use env_sprite entity because i want an animated sprites that can travel, not instant vecStart and vecEnd origin.

Quote:
Originally Posted by DJEarthQuake View Post


How does TE_LIGHTNING work?!
https://forums.alliedmods.net/showpo...8&postcount=14

Use entity_get_vector to have it hold the whatever like aim.
Any example of your code? please paste here. Thank you.
metal_upa is offline
Reply


Thread Tools
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 -4. The time now is 02:30.


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