is this correct
o_definer
Code:
global.identity=0; //SPRITE INDEX OF ENEMY
//
global.battled=1
sound_loop(snd_battle)
room_goto(global);
o_battlecontrol
Code:
CURRENT_ENEMY=1;
CURRENT_SELF=1;
CURRENT_SPRITE=get_sprite(global.enemy[CURRENT_ENEMY]);
CURRENT_SELFSPR=get_sprite(global.our[CURRENT_SELF]);
if variable_global_exists("nointro")==false or variable_global_get("nointro")==false
{
global.killed=0;
global.dead=0;
global.intro=true;
INTROPOS=0;
}
//getting global.turn
global.turn=0;
global.attacking=0;
global.canattack=true;
evisible=true; // if the enemy pokemon is visible
pvisible=true; // if the player pokemon is visible
//^(both used for blinkign when attacking)
blinks=-1;
blinks2=-1;
dead="";
current_y=0;
enemy_y=0;
enemy_h=64;
act="";
//
if variable_global_exists("nointro")
{
if global.nointro=true
{
global.intro=false;
global.nointro=false;
CURRENT_SELF=global.nointro[2];
CURRENT_ENEMY=global.nointro[3];
CURRENT_SPRITE=get_sprite(global.enemy[CURRENT_ENEMY]);
CURRENT_SELFSPR=get_sprite(global.our[CURRENT_SELF]);
}
}
QRST=string(variable_global_array_get("nointro",4));
if QRST!="0" and string_length(QRST)>=2
{
instance_create(0,0,o_attacker);
with o_attacker
{
attack="Useanitem";
visible=false;
//import info about my attack
my_type=real(get_attack_type(attack));
my_speed=real(get_attack_speed(attack));
my_strength=real(get_attack_strength(attack));
my_accuracy=real(get_attack_accuracy(attack));
my_attacktype=get_attack_attacktype(attack);
event_perform(ev_other,ev_user1);
event_perform(ev_other,ev_user2);
///ALL AI ACTIONS ABOVE THIS LINE
//get who is quicker
event_perform(ev_other,ev_user3);
instance_destroy();
}
event_perform(ev_other,ev_user0)
}
o_selector
Code:
width=0;
height=0;
global.imattacking=false;
o_attacker
Code:
pos=1;
current=o_battlecontrol.CURRENT_SELF;
now=4;
repeat 4
{
if global.myattack[current,now]==""
{
number=now-1;
}
now-=1;
}
if variable_local_exists("number")==false
{
number=4;
}
sleep(room_speed);
screen_redraw();
keyboard_clear(ord("Z"));
animation
Code:
instance_destroy();
with(o_battlecontrol)
{
event_perform(ev_other,o_battlecontrol.event);
}
sound_play(snd_attack)
Pokemoncontrol
Code:
T=1;
repeat(global.our_total)
{
spr[T]=get_sprite(global.our[T]);
T+=1;
}
position=1;
Animator
Code:
if sprite_index=0 then visible=false;
if sprite_index!=0{
draw_sprite(sprite_index,image_index,x,y);
}
o_pkmnitemscontrol
Code:
T=1;
repeat(global.our_total)
{
spr[T]=get_sprite(global.our[T]);
T+=1;
}
position=1;
Winbattle
Code:
sound_stop(snd_battle);
sound_loop(snd_battlewin);
alarm[0]=ceil(room_speed+room_speed)
image_alpha=0
o_itemscontrol
Code:
global.nointro=true;
width=0;
height=0;
yplus=0;
dunno if this is correct its from a friend who gave it to me