Add/Remove items or exp from actor INDEX not ID

gotnovicks

Veteran
Veteran
Joined
Feb 15, 2015
Messages
76
Reaction score
9
First Language
Portuguese
Primarily Uses
N/A
Hey Guys!


In my game there'll be missions or dungeons where the player will have to choose 4 other actors to complete them.


I want to add/remove some equips or Exp/Lv from these actors without making a huge conditional branch (I have 10 actors now, and I'm planning to make some more).


I also want to get each actor in party Level during the dungeon to make things harder or easier depending on how they leveled up. For this I'd have to make a HUGE conditional branch to check which actors are in party :/


I thought in something like a script call but instead of giving actorID maybe actorIndex (the actor in 1st position in party, 2nd position...)


So I'd use this to get the actors Level, to give them Exp individualy etc...
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
679
Reaction score
521
First Language
French
Primarily Uses
Hum, I'm not sure I fully understand.


What prevents you from using a variable to get the party member actor id from its index?


Control variables -> Game Data -> Party


You then select the party slot you want to check and it returns the corresponding actor id.


You can then either with conditional branches or with script calls change equipment from all the actors in the party this way.


Same for checking their level. You get like this the id of all four party members, and then you can access their lvl.


Changing exp or level can already be done via a variable so no need for a script call.


If you don't want a lot of conditionnals and want to change equipment by id instead of with a drop down menu, you're gonna need a script call. This google doc contains a large amount of them.


https://docs.google.com/spreadsheets/d/1-Oa0cRGpjC8L5JO8vdMwOaYMKO75dtfKDOetnvh7OHs/edit?pref=2&pli=1#gid=0


For example, to equip a weapon by id, you could use:

Code:
$gameActors.actor(actorId).changeEquip(slotId, $dataWeapons[weaponId]);
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Julian Brooks wrote on Hudell's profile.
Hi, I'm trying to use the Orange Mapshot plugin on Mac, but it isn't working. Could you assist? I'm attempting to do Parallax Mapping. Thanks.
I can't believe my dlc flopped that hard. It's depressing. I'm a fricking failure at being a musician.
Person: "Taxes are bs and money is, too! Anarchy!!" *Literally anything goes wrong* Same Person: "Why hasn't the government fixed this???"
Stream will be live shortly with a session of Haunting Ground! Feel free to drop by!

Forum statistics

Threads
94,357
Messages
920,181
Members
124,112
Latest member
rezalopan
Top