Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
plz help i want to add an interval between the ai/ enemy bot shots |
||||
|
You can use every few seconds do something...and do something later action together... For example Every 1000 ms execute a javascript Var enemy =ccbGetSceneNodeFromName("enemynode") ccbAiCommand(enemy,cancel) Then add an action to this behavior do somwthing later 1000ms then use restart behaviour of a scene node action and slect the enemy scenenode... The javascript command will stop the enemy to shoot every 1 second and after that enemy will start shooting again after 1 second... You can play with the value of ms...for making the enemy shoot according to your game needs... Hope this works for you |
||||
|
thanks so basically create a every few seconds execute java then reset behavior of scene node ps do i have to replace enemy node in the code to my actual ai name? |
||||
|
the dubug console keeps saying syntax error mising arguement i used this code var enemy = ccbGetSceneNodeFromName("Animated Mesh2") |
||||
|
Your code.... Doesn't make sense.... The code should be... here you have to use enemy not aninated mesh.. As animated mesh2 is not defined... |
|