Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hello. I have 2 questions: 1) How to make the enemy to constantly chase the player and tried to harm him? 2) How to add glitchFX to screen? |
||||
|
mmm.. easy.. i think.. every few seconds move enemy to player position var player = ccbGetSceneNodeFromName("player"); var enemy = ccbGetSceneNodeFromName("enemy"); var p_pos = ccbGetSceneNodeProperty(player, "Position"); ccbAICommand(enemy, "moveto", new vector3d(p_pos.x, p_pos.y, p_pos.z)); if you have configured your actors, enemy attack player always. if you dont.. you can add a attack action ccbAICommand(enemy, "attack", player); always you can make a behavior to do this or add more AI. |
||||
|
Brilliant !! Excellent solution jaimezegpi as usual |
||||
|
To add that glitch, add a png file of the fx and drag them to the camera on the control panel on the left up side of the coppercube window. |
|