Saving temporaly actor equipment

Zheg

Veteran
Veteran
Joined
Apr 2, 2014
Messages
42
Reaction score
59
First Language
english
Primarily Uses
Hi community

i been wonderer if there a script wich i can save temporaly the current actor's equipment

something like.... save actor's equipment > clear actor's equipment > after event > restore actor's equipment

everything  with scripts

what i made:

def remember_equip @equip_slot0 = @actor.equips[0] @equip_slot1 = @actor.equips[1] @equip_slot2 = @actor.equips[2] @equip_slot3 = @actor.equips[3] @equip_slot4 = @actor.equips[4]enddef re_equip @actor.equips[0] = @equip_slot0 @actor.equips[1] = @equip_slot1 @actor.equips[2] = @equip_slot2 @actor.equips[3] = @equip_slot3 @actor.equips[4] = @equip_slot4enddef start remember_equip @actor.clear_equipmentsenddef end re_equipendbut its doesnt work, idk why, im not good at programming btw, but i easily can understand some commands

thanks in advance
 

Zheg

Veteran
Veteran
Joined
Apr 2, 2014
Messages
42
Reaction score
59
First Language
english
Primarily Uses
nevermind again

i made it again with

def remember_equip if @actor.equips[0] == nil; @equip_slot0 = 0;else; @equip_slot0 = @actor.equips[0].id;end; if @actor.equips[1] == nil; @equip_slot1 = 0;else; @equip_slot1 = @actor.equips[1].id;end; if @actor.equips[2] == nil; @equip_slot2 = 0;else; @equip_slot2 = @actor.equips[2].id;end; if @actor.equips[3] == nil; @equip_slot3 = 0;else; @equip_slot3 = @actor.equips[3].id;end; if @actor.equips[4] == nil; @equip_slot4 = 0;else; @equip_slot4 = @actor.equips[4].id;end;enddef re_equip @actor.change_equip(0, $data_weapons[@equip_slot0]) @actor.change_equip(1, $data_weapons[@equip_slot1]) @actor.change_equip(2, $data_weapons[@equip_slot2]) @actor.change_equip(3, $data_weapons[@equip_slot3]) @actor.change_equip(4, $data_weapons[@equip_slot4])enddef start remember_equip @actor.clear_equipmentsenddef end re_equipendthx

close thread
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top