Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Cursor, Selection, and Scrolling
#6
I came up with something different.

Like Zeriab said, Using a hash to map identifiers in the form of symbols to the various objects much nicer than using an array. But on top of that, you can use a hash array to store MULTIPLE items for reference, like having this:
Code:
SKILL_ITEM = {}
#SKILL_ITEM[id] = ["skill name", cost]
SKILL_ITEM[0]   = ["Alchemy",      14]
SKILL_ITEM[1]   = ["Thaumatology", 23]

The above example shows that one item (renamed) holds both a name and a skill cost. This way you can keep all your stats for one skill in just one line.

Be that as it may, I still used the hash idea in the code I'm supplying. If I'm right (usually am ^_- ), you wanted to keep track of spellpoints, spellbonuses and free points for each actor. I hope I'm right. If that's the case, you wouldn't be using a Game_SkillPoints class. There would be no need.

The Code

Had to pass the @actor around the script so it knew which actor's data is being used.

With this, you can add points to a single actor's bonus points by this:
Code:
$game_actors[actor_id].modpoint( skill_id, value)
As such, $game_actors[5].modpoint(2,4) would add 4 points to the 'Hacking' skill for actor #5 in your database. The same thing goes for the modboost method you created.

And to start it, you can use this:
Code:
$game_temp.next_scene = nil
$scene = Scene_CharSkills.new(actor_index)
Where the actor_index is the position your guy has in the menu. By default, it is set to 0 for the game player's lead position.

With this, it returns a @skill value matching the index of your SKILLNAME array so you know which one it's messing with.

Oh, I still don't program VX. Winking with a tongue sticking out
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }


Messages In This Thread
Cursor, Selection, and Scrolling - by tnsi - 01-08-2012, 01:08 PM
RE: Cursor, Selection, and Scrolling - by tnsi - 01-08-2012, 09:50 PM
RE: Cursor, Selection, and Scrolling - by Zeriab - 01-09-2012, 12:39 AM
RE: Cursor, Selection, and Scrolling - by tnsi - 01-09-2012, 02:17 AM
RE: Cursor, Selection, and Scrolling - by DerVVulfman - 01-09-2012, 04:21 AM
RE: Cursor, Selection, and Scrolling - by tnsi - 01-09-2012, 08:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Map scrolling nightmare... kyonides 1 3,920 09-09-2017, 06:02 PM
Last Post: kyonides
   Just move the Cursor of the Item_Scene to the right Djigit 24 21,495 08-18-2015, 03:00 AM
Last Post: DerVVulfman
   little Edit of the cursor world map system Djigit 3 5,913 08-24-2014, 02:31 AM
Last Post: Djigit
   Help with Compact Menu Selection Script JackMonty 4 6,429 09-19-2012, 10:56 PM
Last Post: JackMonty



Users browsing this thread: