Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Help modifying a script
#4
Two points.

The Game_Actor class has a method (or def) called screen_x. The method calculates and returns the 'x' position where your battler belongs in the battle-status window. This would be your system to position it horizontally.

The normal code that positions the threat level is
Code:
def refresh
   self.contents.clear
   actors.each_with_index {|a, i|
   self.contents.draw_text(0, i*H, self.width-32, H, a.name)
   self.contents.draw_text(0, i*H, self.width-32, H, @threats[i].to_s, 2)
   }
end
And obviously, if the threat is over the battler, you don't need the name.... so the first 'self.contents.draw_text' isn't needed. You may wanna try this:

Code:
def refresh
   self.contents.clear
   actors.each_with_index {|a, i|
   self.contents.draw_text(a.screen_x, 0, self.width-32, H, @threats[i].to_s, 2)
   }
end

Notice that I use 'a.screen_x' The a is the individual 'actor' in the actors array. And the a.screen_x refers to the x-location that the given actor needs to be placed.

self.contents.font.color = Color(255,0,0,255) .... that's how you set a font color to red. Using RGBA standards (Red Green Blue Alpha/opacity) in a range of 0-255 each.
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
Help modifying a script - by Keeroh - 06-07-2017, 07:56 PM
RE: Help modifying a script - by DerVVulfman - 06-09-2017, 04:10 PM
RE: Help modifying a script - by Keeroh - 06-10-2017, 02:35 AM
RE: Help modifying a script - by DerVVulfman - 06-10-2017, 03:41 AM
RE: Help modifying a script - by Keeroh - 06-10-2017, 06:10 PM
RE: Help modifying a script - by DerVVulfman - 06-10-2017, 07:52 PM
RE: Help modifying a script - by Keeroh - 06-11-2017, 05:43 AM
RE: Help modifying a script - by DerVVulfman - 06-11-2017, 04:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Script compatibility help Lord Vectra 3 3,603 07-25-2021, 11:42 PM
Last Post: DerVVulfman
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 12,926 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   "Wait" in the script Whisper 13 13,774 04-28-2020, 04:06 PM
Last Post: Whisper
   Skill Cooldown script Fenriswolf 11 14,160 12-10-2019, 11:10 AM
Last Post: Fenriswolf
   Help iwth script (RGSS Player crash) Whisper 3 7,671 06-17-2017, 05:03 PM
Last Post: Whisper
Question  Mog Menu script: help me stop the crazy picture movement during transitions Zachariad 4 8,677 05-31-2017, 05:10 AM
Last Post: Zachariad
   Permanently modifying move speed Keeroh 5 8,570 05-24-2017, 05:47 AM
Last Post: DerVVulfman
   Actor names in Quest Script jreagan406 5 7,638 03-07-2017, 08:06 AM
Last Post: JayRay
   Bizarre issue with Lanzer counter script. Steel Beast 6Beets 2 6,631 10-04-2016, 11:46 AM
Last Post: Steel Beast 6Beets
   Moonpearl script Animated Battlers help!! x(( Starmage 11 13,855 05-21-2016, 05:34 AM
Last Post: Starmage



Users browsing this thread: