scripting:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scripting:start [2022/08/10 22:59] – [Snippets] jerryhopper | scripting:start [2022/08/25 15:14] (current) – [Enumerations] jerryhopper | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Scripting ====== | ====== Scripting ====== | ||
- | New to scripting? | + | New to scripting? |
- | Or read about the most common functions | + | We'll keep the most common functions |
===== Snippets ===== | ===== Snippets ===== | ||
+ | [[snippets]] | ||
+ | ===== Global functions ===== | ||
- | < | + | [[scripting: |
+ | [[AttachCameraToEntity()]] | ||
- | //Get the entity (soldier) | + | [[scripting: |
- | GenericEntity soldier = GenericEntity.Cast(GetWorld().FindEntityByName(" | + | |
+ | ===== Enumerations ===== | ||
- | //Control the Soldier. | ||
- | CharacterControllerComponent soldier_c = CharacterControllerComponent.Cast(soldier.FindComponent(CharacterControllerComponent)); | ||
- | // change stance | + | [[scripting: |
- | soldier_c.SetStanceChange(ECharacterStanceChange.STANCECHANGE_TOCROUCH); | + | |
- | // move soldier | + | [[scripting: |
- | vector direction = {0,0,1}; | + | |
- | soldier_c.SetMovement(2, | + | |
+ | [[scripting: | ||
- | // shoot phase 1 | + | ===== Classes ===== |
- | soldier_c.SetWeaponRaised(true); | + | |
- | soldier_c.SetSafety(false, | + | |
- | // shoot phase 2 | + | [[scripting: |
- | soldier_c.SetFireMode(2); | + | |
- | soldier_c.SetFireWeaponWanted(1) | + | |
- | </ | + | |
- | ===== Global functions ===== | + | |
- | [[scripting: | + | [[scripting: |
- | [[AttachCameraToEntity()]] | + | ==== restAPI ==== |
- | [[scripting: | ||
- | ===== Classes ===== | ||
- | [[scripting: | + | [[scripting: |
- | + | ||
- | [[scripting: | + | |
+ | [[scripting: | ||
+ | [[scripting: | ||
===== Components ===== | ===== Components ===== | ||
scripting/start.1660168788.txt.gz · Last modified: 2022/08/10 22:59 by jerryhopper