Raised This Month: $ Target: $400
 0% 

[ Unachievable ] Mirroring/Changing sprite angle?


Post New Thread Reply   
 
Thread Tools Display Modes
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-08-2020 , 17:44   Re: Changing sprite angle?
Reply With Quote #11

Quote:
Originally Posted by JocAnis View Post
Editing the sprite will be faster solutiom
what do you mean by editing the sprite, you mean adding more frames?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-08-2020 , 20:03   Re: Changing sprite angle?
Reply With Quote #12

EngFunc_ChangeYaw
__________________
DJEarthQuake is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 12-09-2020 , 07:43   Re: Changing sprite angle?
Reply With Quote #13

Export the sprite frames and rotate in an image editor. Photoshop, gimp and there's even web browser tools to do that
__________________








CrazY. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-09-2020 , 08:56   Re: Changing sprite angle?
Reply With Quote #14

Quote:
Originally Posted by CrazY. View Post
Export the sprite frames and rotate in an image editor. Photoshop, gimp and there's even web browser tools to do that
Yeah about that I don't want to add more frames to the sprite since I'll be already using alot of frames in the sprite.


Quote:
Originally Posted by DJEarthQuake
EngFunc_ChangeYaw

Can you explain what this will do/effect?


Edit: I think its impossible to mirror the sprite using the amxmodx or in the goldsrc engine.

Edit - 2 : also the scaling doesn't accept negative values
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 12-09-2020 at 15:02.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-11-2020 , 10:59   Re: [ Unachievable ] Mirroring/Changing sprite angle?
Reply With Quote #15

Yaw adjusts ent left and right from it's perpendicular.

__________________
DJEarthQuake is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-11-2020 , 14:03   Re: [ Unachievable ] Mirroring/Changing sprite angle?
Reply With Quote #16

Yeah this won't work.

It will not affect the sprite in any way the only possible method is to add more frames to the sprite.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 12-11-2020 at 14:04.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-12-2020 , 03:12   Re: [ Unachievable ] Mirroring/Changing sprite angle?
Reply With Quote #17

Quote:
Originally Posted by Natsheh View Post
an update it doesn't work the sprite gets gigantic when setting the entity scale to -1.0


Test Code
PHP Code:

public clcmd_test(id)
{
    new 
ent create_entity("env_sprite");
    
    new 
Float:fOrigin[3];
    
entity_get_vector(idEV_VEC_originfOrigin);
    
entity_set_origin(entfOrigin);
    
    
entity_set_int(entEV_INT_movetypeMOVETYPE_FLY);
    
entity_set_model(entszModel);
    
entity_set_size(entFloat:{-1.0,-1.0,-1.0}, Float:{1.0,1.0,1.0});
    
    
// Set the animation's framerate
    
set_peventpev_frame0.0 )
    
set_peventpev_framerate0.5 )
    
entity_set_float(entEV_FL_scale, -1.0);
    
set_peventpev_spawnflagsSF_SPRITE_STARTON )
    
    
dllfuncDLLFunc_Spawnent )


Quote:
Originally Posted by Natsheh View Post
Yeah this won't work.

It will not affect the sprite in any way the only possible method is to add more frames to the sprite.
From my atomic grenade plugin. Before I matched the angles the sprites looked stuck in 2D. So if there is an ent in the world this clones it's angles. If you want to mirror it - go figure. Remember when dealing with 360 degrees that's not calculated in float scale 1.0 and -1.0. On a 360 if one makes a plus one and a minus one degree change that is 0 and does nothing. We do a 180 to mirror.

Code:
    new Float:End_Position[3];     if(pev_valid(ent)){     entity_get_vector(ent,EV_VEC_origin,End_Position);     entity_get_vector(ent,EV_VEC_angles,Axis);     }
__________________
DJEarthQuake is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-12-2020 , 10:18   Re: [ Unachievable ] Mirroring/Changing sprite angle?
Reply With Quote #18

I'm not gonna lie I didn't understand anything maybe try explaining in a better way?

And maybe try to attach some functional code, that prove mirroring works?

The only thing I understood that the sprites have an angle between 0 and 360 and don't accept a negative scales.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 12-12-2020 at 10:18.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-12-2020 , 20:25   Re: [ Unachievable ] Mirroring/Changing sprite angle?
Reply With Quote #19

That is from functional code! Clones ent's angles in motion. I use it for a grenade plugin to add effects. The closest I have applied this is to windage.

The deg is wind direction from openweathermap to match cities.

Given:
Code:
stock EF_CrosshairAngle(const CLIENT, Float:pitch, Float:yaw) {     return engfunc(EngFunc_CrosshairAngle, CLIENT, pitch, yaw); } stock EF_ChangeYaw(const ENTITY) {     return engfunc(EngFunc_ChangeYaw, ENTITY); } stock EF_ChangePitch(const ENTITY) {     return engfunc(EngFunc_ChangePitch, ENTITY) }
Code:
#if defined WIND public windage(id) { g_DeG = nvault_get(g_vault, "deg"); new Float:g_Wind g_Wind =  g_DeG*-0.7; if (g_env >= 2)     EF_CrosshairAngle(id, g_Wind, g_Wind ); }     public fix(id)     EF_CrosshairAngle(id, 0.0, 0.0 ); #endif

More later if you still need help with your unobtainium.

__________________

Last edited by DJEarthQuake; 12-12-2020 at 21:10. Reason: pev_ideal_yaw
DJEarthQuake is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-16-2021 , 06:59   Re: [ Unachievable ] Mirroring/Changing sprite angle?
Reply With Quote #20

bump, this is not what i desire !

altho thanks for your time DJEarthQuake
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 14:11.


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