
ID:273129
![]() Oct 4 2009, 3:48 pm
|
|
I'm trying to figure out ways to MouseDrop() an object into one of my empty object slots. Basically I was to replace one of the four "Empty" slots with the skill I Click() and assign to. Then, be able to replace that skill with another skil if I assign one there, setting the old skill in my Free Skills section. I have no clue on how to do it. I've switched from grids back to the statpanel way and I KNOW it's possible. I've seen it once. Heres an image of this issue.
![]() |
Anyway, this involves rather simple usage of MouseDrop(). It's not difficult, you just need to not be fazed by the amount of arguments it has, read what each one is in the Reference carefully and use the ones you need. Then do whatever you want according to the arguments' values - in this case you'd want to change vars (preferably one var which contains a list) of the player that represent his slots.
In case you are not aware, note that as only atom objects can have regular mouse control used on them, you'd have to display the "Empty" text using an actual atom instead of a text string, so it's actually interactable. You could use an obj with no icon named "Empty". You won't need to use multiple such dummy objs for each unused row in the statpanel - you can just reuse the same one for each. In fact, you can only create on such obj globally, stored in a global variable, and share that single obj with all of your players, e.g.:
Anyway, here's a psuedo-code example of the MouseDrop() override: