scripting:basics
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scripting:basics [2022/08/11 14:11] – [Get a CharacterEntity, and control it] jerryhopper | scripting:basics [2022/08/11 14:32] (current) – jerryhopper | ||
---|---|---|---|
Line 45: | Line 45: | ||
- | So, the result of the above is that we have a variable with the name ' | + | So, the result of the above is that we have a variable with the name '**btr**' which '**type**' is '**GenericEntity**' |
Line 71: | Line 71: | ||
- | ===== Get a CharacterEntity, and control it ===== | + | ===== Control |
- | Lets continu from Example #2. | + | Lets continu from Example #2. We now have an entity, and its time we control it. |
+ | |||
+ | ==== Change stance ==== | ||
If we want to change the stance of the soldier, we can do so via this CharacterController. | If we want to change the stance of the soldier, we can do so via this CharacterController. | ||
Line 91: | Line 94: | ||
Great! | Great! | ||
+ | |||
+ | ==== Move ==== | ||
+ | |||
+ | Now lets try make the character move. To move a character, we need to know what speed and direction you want to move. We will use a variable which we declare as a ' | ||
+ | |||
+ | |||
+ | vector direction = {0,0,1}; | ||
+ | |||
+ | The ' | ||
+ | |||
+ | soldier_c.SetMovement(2, | ||
+ | | ||
+ | That should do the trick. Your character should be moving in the given direction. |
scripting/basics.1660223466.txt.gz · Last modified: 2022/08/11 14:11 by jerryhopper