AI Players
by Image College of Art & Tech (#00 · in General Discussion · 05/19/2008 (3:10 am) · 3 replies
In the default game "Starter.fps" , AI Player is not shooting .
How can i make the AI Player to shoot at player ?
How can i make the AI Player to shoot at player ?
About the author
Sam Austintino
%client.player.setname("dirk"); // SA - sets the name of the client player to 'dirk' for fun and aiming %bobpos = "399.412 299.768 320.391"; // SA - assigns a starting position for the new AI unit 'bob' bob.kill(); // SA - kills any old instance of bob that might still exist in world new AIPlayer(Bob) { datablock = "PlayerBody"; position = %bobpos; }; // SA - creates a new AI Player 'bob' bob.mountImage(crossbowImage, 0); // SA - mounts the crossbow weapon image on node 0 of bob bob.incInventory(crossbowAmmo, 5); // SA - increases bob's crossbow ammo by adding five bolts bob.setAimObject("dirk", "0 0 1"); // SA - instructs bob to constantly aim at Dirk bob.setImageTrigger(0,1); // SA - instructs bob to keep firing the weapon that is mounted on node 0Good luck. Have fun.