AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [ Unachievable ] Mirroring/Changing sprite angle? (https://forums.alliedmods.net/showthread.php?t=328807)

Natsheh 11-26-2020 07:58

[ Unachievable ] Mirroring/Changing sprite angle?
 
Is it possible to change the sprite/Mirror angle from right to left?

redivcram 11-26-2020 09:37

Re: Changing sprite angle?
 
Post your code

Natsheh 11-26-2020 11:07

Re: Changing sprite angle?
 
I don't need a code for a simple question.

You have a env_sprite entity, wondering if it's possible to change the sprite view from right to left .

An example Image
https://i.stack.imgur.com/QQlU6.gif



Edit : I think it will be solved if I changed the entity scale to negative. I only need to test and give a feedback.

HamletEagle 11-26-2020 12:57

Re: Changing sprite angle?
 
Scale with a negative value is mirroring so your idea should work, at least in theory.

Natsheh 11-26-2020 18:24

Re: Changing sprite angle?
 
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 )



JocAnis 11-26-2020 20:54

Re: Changing sprite angle?
 
what happens with changing pev_angles?

Natsheh 11-26-2020 21:42

Re: Changing sprite angle?
 
it doesn't flip like the picture, it rather just rotates around the forward axis

Natsheh 12-02-2020 13:08

Re: Changing sprite angle?
 
Bump

Natsheh 12-08-2020 13:25

Re: Changing sprite angle?
 
i would appreciate if anyone have a suggestion to the problem.

JocAnis 12-08-2020 16:52

Re: Changing sprite angle?
 
Editing the sprite will be faster solutiom


All times are GMT -4. The time now is 14:11.

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