Blockland Forums > Modification Help
Homing Player With Sword Weapon
Uxie:
"Homing" Player With Sword Weapon.
Bauklotz:
If %obj is the player, and %trg is the target:
--- Code: ---%bot = new AIPlayer() {
position = %obj.getPosition();
datablock = %obj.getDataBlock();
};
%bot.setDamageLevel(%obj.getDamageLevel());
%bot.mountImage(%obj.getMountedImage(0), 0);
%bot.mountImage(%obj.getMountedImage(1), 1);
// copy appearance of %obj to %bot
%obj.client.camera.setOrbitMode(%bot, effin, forgot, dem, args);
%obj.client.setControlObject(%obj.client.camera);
%obj.setTransform("0 0 -10000");
%bot.setMoveObject(%trg);
%bot.setTrigger(0, true);
// ...
// ... when boost, aka attack is over (%bot is the bot, %obj is the player)
%bot.stop();
%bot.setTrigger(0, false);
%obj.setTransform(%bot.getTransform());
%obj.setDamageLevel(%bot.getDamageLevel());
%obj.client.setControlObject(%obj);
%bot.delete();
--- End code ---
Of course not complete, fill in dem' missing parts.
Uxie:
--- Quote from: Bauklotz on January 13, 2011, 03:14:47 AM ---If %obj is the player, and %trg is the target:
--- Code: ---%bot = new AIPlayer() {
position = %obj.getPosition();
datablock = %obj.getDataBlock();
};
%bot.setDamageLevel(%obj.getDamageLevel());
%bot.mountImage(%obj.getMountedImage(0), 0);
%bot.mountImage(%obj.getMountedImage(1), 1);
// copy appearance of %obj to %bot
%obj.client.camera.setOrbitMode(%bot, effin, forgot, dem, args);
%obj.client.setControlObject(%obj.client.camera);
%obj.setTransform("0 0 -10000");
%bot.setMoveObject(%trg);
%bot.setTrigger(0, true);
// ...
// ... when boost, aka attack is over (%bot is the bot, %obj is the player)
%bot.stop();
%bot.setTrigger(0, false);
%obj.setTransform(%bot.getTransform());
%obj.setDamageLevel(%bot.getDamageLevel());
%obj.client.setControlObject(%obj);
%bot.delete();
--- End code ---
Of course not complete, fill in dem' missing parts.
--- End quote ---
So, this won't work?
Amade:
--- Quote from: Uxie on January 17, 2011, 11:13:55 AM ---So, this won't work?
--- End quote ---
what exactly did you do with it because just copy+pasting it into your script was not the intended usage.
lordician:
--- Quote from: Uxie on January 12, 2011, 10:07:15 PM ---"Homing" Player With Sword Weapon.
--- End quote ---
Woops. Sorry. :C