Change entity moving pls help!
Quote:
BUT i would need a circular movement andlong that....in order to create something like this: https://images-ext-2.discordapp.net/...96/unknown.png a buddy made that but lost the code....and i lost the buddyXD since the entity is moving automatly forward i only would need to have it move in circle.........with the trail it creates it should look then like a spiral. so how can i have that thing move in a cirle? i want a radial movement around a center. can someone help there? pls |
Re: Change entity moving pls help!
new Float:avelocity[3]
avelocity[1] = someFloatValue; // rotating on y axis set_pev(entity, pev_avelocity, avelocity); ------------------------------------------------ new Float:g_rotation_matrix[2][2] new Float:g_vec[3] = {70.0, 0.0, 0.0} new Float:g_deg = 0; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); set_task(0.0001, "rotate", 4373, _, _, "b") } public rotate(){ new Float:x, Float:y x = 70*floatcos(g_deg, degrees); y = 70*floatsin(g_deg, degrees); g_deg += 10; display() g_vec[0] = x g_vec[1] = y } public display(){ static players[32], pnum, origin[3] get_players(players, pnum) for(new i; i<pnum; i++){ get_user_origin(players[i], origin) message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(TE_SPARKS) write_coord( floatround(g_vec[0] + origin[0]) ) write_coord( floatround(g_vec[1] + origin[1]) ) write_coord( floatround(g_vec[2] + origin[2]) ) message_end() } } -------------------------------- anything of these good? cmon guys.... |
Re: Change entity moving pls help!
http://esfkami.net/forum.php?mod=vie...extra=page%3D1
dont get it to works........its turning but around me......i dont see the mistake i do |
| All times are GMT -4. The time now is 12:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.