AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] Rotate .spr model (https://forums.alliedmods.net/showthread.php?t=319699)

metal_upa 11-15-2019 13:55

[Help] Rotate .spr model
 
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.


sma

georgik57 11-16-2019 09:42

Re: [Help] Rotate .spr model
 
Check the war3ft mod's code and look for thunder ultimate.

metal_upa 11-17-2019 04:02

Re: [Help] Rotate .spr model
 
Quote:

Originally Posted by georgik57 (Post 2673121)
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.

Xalus 11-17-2019 04:26

Re: [Help] Rotate .spr model
 
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

georgik57 11-17-2019 06:42

Re: [Help] Rotate .spr model
 
Why do you want to use server sided entities anyway?

Xalus 11-17-2019 08:14

Re: [Help] Rotate .spr model
 
Quote:

Originally Posted by georgik57 (Post 2673224)
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.

georgik57 11-17-2019 09:17

Re: [Help] Rotate .spr model
 
Afaik the beam entities stock is bugged in that regard. I remember testing it a few years ago.

Xalus 11-17-2019 11:31

Re: [Help] Rotate .spr model
 
Quote:

Originally Posted by georgik57 (Post 2673250)
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.

DJEarthQuake 11-17-2019 14:59

Re: [Help] Rotate .spr model
 
Quote:

Originally Posted by metal_upa (Post 2673053)
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.


https://forums.alliedmods.net/image-...37363439353837

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.

metal_upa 11-26-2019 09:20

Re: [Help] Rotate .spr model
 
Quote:

Originally Posted by Xalus (Post 2673207)
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 (Post 2673224)
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 (Post 2673287)
https://forums.alliedmods.net/image-...37363439353837

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.


All times are GMT -4. The time now is 15:01.

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