1 decade ago by Datamosh
Hello! Today I got inspired and started this plugin to program enemies (ideal for games like MegaMan)
Still not finished, hundreds of things missing.
Download, info & docs
https://github.com/datamosh/ImpactJS-Bot-plugin
Example (probably outdated)
Still not finished, hundreds of things missing.
Download, info & docs
https://github.com/datamosh/ImpactJS-Bot-plugin
Example (probably outdated)
// Configure bot
bot: {
config: {
loop: true, // [boolean] (Optional, default true) - Loop routine
hole_jump: false, // [boolean] (Optional, default true) - If there's a hole in the collision map, jump
hole_wall: true // [boolean] (Optional, default false) - If there's a hole in the collision map, change direction
},
movements: [
// Wait for player and then wait 100 milliseconds
{
action: 'wait',
entity: 'player',
duration: 0.1,
start: function() {
console.log('Starts waiting');
},
during: function() {
console.log('Im waiting!');
},
complete: function() {
console.log('Movement complete!')
}
},
// Walk left
{
action: 'walk',
direction: 'left',
distance: 40,
start: function() {
console.log('Starts walking');
},
during: function() {
console.log('Im walking!');
},
complete: function() {
console.log('Movement complete!')
}
},
// Jump in place
{
action: 'jump',
//direction: 'right',
vel: 150,
start: function() {
console.log('Starts jumping');
},
during: function() {
console.log('Im jumpig!!1!');
},
complete: function() {
console.log('Movement complete!')
}
},
// Call a function
{
action: function() {
console.log('Routine complete')
}
}
]
},
