AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Object Move (https://forums.alliedmods.net/showthread.php?t=163970)

weplausss 08-05-2011 17:58

Object Move
 
Hi how i can edit my byt move type.Now my byt jumps but i want to fly from point a to b no touch the ground.

Sorry for my english i make picture my idea :D
please help me :D
[IMG]http://img89.**************/img89/3969/alieds.png[/IMG]

//my Code
PHP Code:

new Float:flProperty1;

peventpev_fuser1flProperty1);

if( 
flProperty1 == 0.0 )
Move[id][2] = 500.0;
else
Move[id][2] = flProperty1;

Move[id][1] = 0.0;
Move[id][0] = 0.0;

entity_set_int(entEV_INT_movetypeMOVETYPE_BOUNCE);
set_pev(entpev_velocityMove[id][0], Move[id][1], Move[id][2]); 


Exolent[jNr] 08-05-2011 19:18

Re: Object Move
 
Set movetype to MOVETYPE_FLY so it isn't affected by gravity.
Then you can set it's velocity at the speed you want it to travel from A->B.
Then you can calculate how long it will take for it to reach B, and then set the velocity again so that it move from B->A.
Then repeat.

weplausss 08-06-2011 06:38

Re: Object Move
 
can you write code??

Exolent[jNr] 08-06-2011 06:58

Re: Object Move
 
You're in Scripting Help, so you are expected to at least try yourself before asking.

weplausss 08-06-2011 07:20

Re: Object Move
 
Quote:

Then you can set it's velocity at the speed you want it to travel from A->B.
i change MOVE_TYPE but
i don't know how set velocity.
my object fly to ceiling and don't move
PHP Code:

entity_set_int(entEV_INT_movetypeMOVETYPE_FLY); 


Hunter-Digital 08-06-2011 07:40

Re: Object Move
 
That's because you're actually doing that, you're setting velocity on Z axis.
Search for tutorials on origins, angles and vectors and learn to understand them first.

You also need to parse a 3-cell array to that set_pev(), not each x,y,z.

weplausss 08-06-2011 09:27

Re: Object Move
 
where i can find tutorial i loking Code Snippets/Tutorials and don't find anything

Hunter-Digital 08-06-2011 09:31

Re: Object Move
 
Why was I able to find it ? It took less than writing this post to find the thread: http://forums.alliedmods.net/showthread.php?t=91474

weplausss 08-06-2011 09:39

Re: Object Move
 
thank you

weplausss 08-06-2011 10:26

Re: Object Move
 
how i can get "ent origin"
for player is
PHP Code:

get_user_originidiOrigin 



All times are GMT -4. The time now is 03:24.

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