Jump to content

Announcing our new website

To find out the latest about our new website, visit Game Dev Unlimited

- - - - -

Actors who cant be controlled


  • You cannot reply to this topic
8 replies to this topic

#1 Bob423

    Bless your face

  • Member
  • 883 posts

Posted 15 September 2011 - 12:15 AM

i need to be able to make an ally act as an npc. just that one ally though. like sephiroth in one part of FF7.

thanks

#2 Bob423

    Bless your face

  • Member
  • 883 posts

Posted 17 September 2011 - 03:12 AM

where are you kellessdee! lol bump

#3 Bob423

    Bless your face

  • Member
  • 883 posts

Posted 19 September 2011 - 03:03 AM

so is this one unspecific to?

#4 bigace

    King of Spades

  • Member
  • 730 posts

Posted 19 September 2011 - 07:34 PM

Hope this is what you're looking for :sweatdrop:
site: http://rpgcreative.n...uto-combat.html
#==============================================================================
# ¦ Auto_Battle
#------------------------------------------------------------------------------
# Edited from default scripts by Thousand Dragoon Link and Sir_KnightDragoon
# Comments by Thousand Dragoon Link
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ? Renewal of a frame (party command phase)
#--------------------------------------------------------------------------
def update_phase2
if Input.trigger?(Input::C)
case @party_command_window.index
when 0 # Fight
# Determine if a SE is performed.
$game_system.se_play($data_system.decision_se)
start_phase3
when 1 # Escape.
# escape is not possible
if $game_temp.battle_can_escape == false
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
update_phase2_escape
when 2 # Auto-Battle
$game_system.se_play($data_system.decision_se)
update_phase2_auto
end
return
end
end
#--------------------------------------------------------------------------
# Renewal of a frame (party command phase : auto)
#--------------------------------------------------------------------------
def update_phase2_auto
loop do
if @actor_index == $game_party.actors.size-1
start_phase4
return
end
@actor_index += 1
$game_party.actors[@actor_index].current_action.kind = 0
$game_party.actors[@actor_index].current_action.basic = 0
$game_party.actors[@actor_index].current_action.decide_random_target_for_actor
end
end
end

class Window_PartyCommand < Window_Selectable
#--------------------------------------------------------------------------
# object initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
#Change the commands to what you want them to say
@commands = ["Combat", "Fuite", "Auto-Combat"]
@item_max = 3
@column_max = 3
draw_item(0, normal_color)
draw_item(1, $game_temp.battle_can_escape ? normal_color : disabled_color)
draw_item(2, normal_color)
self.active = false
self.visible = false
self.index = 0
end
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(80 + index * 160 + 4, 0, 128 - 10, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index], 1)
end
#--------------------------------------------------------------------------
# Renewal of the rectangle cursor
#--------------------------------------------------------------------------
def update_cursor_rect
self.cursor_rect.set(80 + index * 160, 0, 128, 32)
end
end

Edited by bigace, 19 September 2011 - 07:35 PM.


#5 Bob423

    Bless your face

  • Member
  • 883 posts

Posted 19 September 2011 - 09:40 PM

lol wut?

no, i have no idea what that is, but it doesnt look right.


i want to make it so a certain actor always acts as an npc in battle. like an ally that you cant control. the ally will never be controllable ever, in any battle. period. they just help you out.

like sephiroth in one part of FF7
in that battle, sephiroth is in your party, but he cannot be controlled, and will heal you if you die.

#6 bigace

    King of Spades

  • Member
  • 730 posts

Posted 20 September 2011 - 02:37 AM

I know what your talking about thats why I gave you that script, no need for a video that I skipped over. It was in FF12 as well as RMVX. Its not NPC its Auto-battle, its just that I didn't look at that script well enough. I just saw the word autobattle script and got it.

The word your looking for is Guest not NPC: Makes the character behave automatically, without being controlled by the player. I can try to make it, but we should let Kellesede do it.

#7 kellessdee

    mrrow ~!

  • Moderator
  • 902 posts

Posted 20 September 2011 - 03:19 AM

View Postbigace, on 20 September 2011 - 02:37 AM, said:

I can try to make it, but we should let Kellesede do it.
LOL, you shouldn't doubt your own ability ;) I am sure you could do this.

Anyways, I WILL take a look into these scripts bob, I just have A REALLY tight/busy schedule at the moment, and I have no idea WHEN I will have the time to check these out.

my schedule:
Mon-thurs: School most of the day
Fri-sun: work most of the day

I have a 7 day schedule, every week. School also generates a lot of group work/other homework which that in combination with sleep (which I do not get near enough of, because of Linux XD, I don't remember the last time i booted to windows) takes up most of my free time.

Sorry, that was a bit off-topic, but I am trying to say either A ) Do not rely on me or B ) Have A LOT of patience.

#8 bigace

    King of Spades

  • Member
  • 730 posts

Posted 20 September 2011 - 05:20 AM

View Postkellessdee, on 20 September 2011 - 03:19 AM, said:

LOL, you shouldn't doubt your own ability ;) I am sure you could do this.

Anyways, I WILL take a look into these scripts bob, I just have A REALLY tight/busy schedule at the moment, and I have no idea WHEN I will have the time to check these out.

my schedule:
Mon-thurs: School most of the day
Fri-sun: work most of the day

I have a 7 day schedule, every week. School also generates a lot of group work/other homework which that in combination with sleep (which I do not get near enough of, because of Linux XD, I don't remember the last time i booted to windows) takes up most of my free time.

Sorry, that was a bit off-topic, but I am trying to say either A ) Do not rely on me or B ) Have A LOT of patience.

Okay, I'll see what I can do. If it messes it up and I don't know why, I'll see if you can fix it. :sweatdrop:

#9 kellessdee

    mrrow ~!

  • Moderator
  • 902 posts

Posted 20 September 2011 - 05:49 AM

View Postbigace, on 20 September 2011 - 05:20 AM, said:

Okay, I'll see what I can do. If it messes it up and I don't know why, I'll see if you can fix it. :sweatdrop:

Haha, I wasn't implying you HAD to do it, it just seemed like you were cutting yourself short :) Although, if you are looking into expanding on your scripting abilities this would be great practice for you.





0 user(s) are reading this topic

members, guests, anonymous users