How do I do things with Entities?
Alright well now that goku is completed, i've decided to move on to my next BIG project, making a hero that has a disk that hurts people. I know how to create the entity and set the model, but now I don't know how to set the speed of an entity, and also where to initially place the entity. Overall I need some big help. I mean I could try and study the engine include or the Vexd_Utilities but there are just too many functions. And the comments that go along with the includes are kind of vague. I could also try ripping from bazooka, but I want to actually learn how to do the coding. So, if anyone wants to teach me how to do stuff with an Ent, please do; it will allow me to make my hero plus also make future heroes that i plan to make using entities.
P.S. you don't know how excited I am to make these heroes =D. And i'll also post more stuff if I need more help. |
well when u create an entity you set their origin and their default values. Then you can either set their origin to a specific place(if thats what you want)
or you can set entity's movetype and velocity thus it will move by itself (and u can gives its first push). |
Oh yeah while i was looking at the createEntity method the parameter is szClassname[], what do i put for that? anything i want?
|
yeah u can name the classname anything u want ;)
|
Sweet! cool, now um.... for the move type, what parameters are required for SV_movestep() cause i don't know what include the SV_movestep() function is in..... I mean I want my move type to follow wherever you're looking at with your crosshair with a certain amount of speed. I believe that this would do it right? That is if you put it in the SV_movestep() function.
Code:
// track movement of aiment |
no classname cannot be anything.
It has to be a valid classname. If you dont know what to use then just use "info_target" |
alright thx for the info freecode, and what about the SV_movestep() function? I can't seem to find it in the includes.
|
i appologize lol... i misread it and thought it was:
entity_set_string(newEnt, EV_SZ_classname, "Anyname") or is that wrong too o.O... eh well, atleast I learn something new today :D i thought u didn't have internet while moving freecode? |
Yeah that looks pretty right to me for that method:
native entity_set_string(iIndex, iKey, const szNewVal[]); index would be the newly created entity, don't know about key, might be class name, and the last parameter is for setting gun models, or more generic, string values. Anyways on topic, anyone having luck finding the SV_movestep() function? |
he was talking about the create_entity native which takes a classname
Code:
and about Quote:
Code:
And i didnt move yet. about 5 -6 days left till i leave |
All times are GMT -4. The time now is 09:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.