Latest topics
» Simple light swicher
Today at 12:28 am by kohedlo

» [2.6] New Texture Studio
Tue Aug 22, 2017 4:06 am by kohedlo

» Open Space server
Thu Aug 17, 2017 10:14 pm by kohedlo

» Imperial Game Engine SDK" 1 september 2017 update
Thu Aug 17, 2017 9:53 am by kohedlo

» Wellcome to publications new cathegory
Mon Aug 14, 2017 3:18 am by kohedlo

» Локации и всякие уровни
Sun Aug 13, 2017 10:23 pm by kohedlo

» Кандидаты на модели
Sun Aug 13, 2017 10:15 pm by kohedlo

» Общее описание
Sun Aug 13, 2017 10:15 pm by kohedlo

» "Імперський гральний рушiй SDK" Оновлення за 15 серпня 2017
Sat Aug 12, 2017 9:00 pm by kohedlo

Search
 
 

Display results as :
 


Rechercher Advanced Search

Keywords

download  

August 2017
MonTueWedThuFriSatSun
 123456
78910111213
14151617181920
21222324252627
28293031   

Calendar Calendar

Партнеры
Создать форум
Language
Top posting users this week
kohedlo
 


Controller scripting

View previous topic View next topic Go down

Controller scripting

Post by kohedlo on Wed Jun 24, 2015 4:44 am

Result: make simple character controller for FPS, TPS or Racing game type.

Implemention: For character controller we can use iscene template ass class of our controller.

- First need dragg animated imodel on our iscene.
- Secont script input events by connection with moving and animation playing action functions.

-import model and textures in resource packet.
- prepare imodel: open in model editor, set size, fetch geometry, save imodel.





In preferences we must set IS3DSTATIC preference to OFF.



Lets add model on map iscene.





Next lets script our controller iscene:

- for open iscene script need check LawMaker EDIT property in iscene preferences.



For catching input we can use [events/input/OnKey.ifn] script event node. In node preference we sets keyboard key that we wish.



Next we cteate moving model by fact throught [actions/actors/translate_actor.ifn and actions/actors/rorate_actor.ifn] script methods. For this we nees set actor instance that need move [variables/instances/IScene_Actor.ifn] (before creating instance of actor imodel we must select imodel in scene tree.)



Second add to our moving soldier function soundplaying of soldier steps.

Cathing input event - when key down (first port) process  start play sound. Please note that in preference sound variable we can set loop playing preference for short soundfiles. When move key in state UP (Released) (second event port)- we connect port by connector with stop playing port in SoundPlayer action method.



And last we add in our moving character function element of playing skeletak animation throught [action/animation/PlayAnimation(imodel_skeletal).ifn]

For this action function need two wariables. 1- imodel of soldier in our scene. 2 animation name. For last we must select animation in ModelEditor.



At end we save our scene and run ineditor game simulation.

Result in next video:



Demo packet of this tutorial you can download there:

Download

kohedlo
Admin

Сообщения : 887
Experiance Points : 2035
Reputation : 2
Дата регистрации : 2009-08-30

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum