Raised This Month: $ Target: $400
 0% 

Object Move


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
weplausss
Member
Join Date: Mar 2010
Old 08-05-2011 , 17:58   Object Move
Reply With Quote #1

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
please help me
[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]); 
weplausss is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-05-2011 , 19:18   Re: Object Move
Reply With Quote #2

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.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
weplausss
Member
Join Date: Mar 2010
Old 08-06-2011 , 06:38   Re: Object Move
Reply With Quote #3

can you write code??
weplausss is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-06-2011 , 06:58   Re: Object Move
Reply With Quote #4

You're in Scripting Help, so you are expected to at least try yourself before asking.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
weplausss
Member
Join Date: Mar 2010
Old 08-06-2011 , 07:20   Re: Object Move
Reply With Quote #5

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); 
weplausss is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-06-2011 , 07:40   Re: Object Move
Reply With Quote #6

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.
__________________
Hunter-Digital is offline
weplausss
Member
Join Date: Mar 2010
Old 08-06-2011 , 09:27   Re: Object Move
Reply With Quote #7

where i can find tutorial i loking Code Snippets/Tutorials and don't find anything
weplausss is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-06-2011 , 09:31   Re: Object Move
Reply With Quote #8

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
__________________
Hunter-Digital is offline
weplausss
Member
Join Date: Mar 2010
Old 08-06-2011 , 09:39   Re: Object Move
Reply With Quote #9

thank you
weplausss is offline
weplausss
Member
Join Date: Mar 2010
Old 08-06-2011 , 10:26   Re: Object Move
Reply With Quote #10

how i can get "ent origin"
for player is
PHP Code:
get_user_originidiOrigin 
weplausss is offline
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 03:24.


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