Delete

Started by Geust, June 05, 2010, 11:46:52 am

Previous topic - Next topic

Geust

June 05, 2010, 11:46:52 am Last Edit: April 01, 2021, 05:32:39 am by earthnite
Thanks.

SBR*

Just do it with events. Let the player swap places with the event, change the event's graphic to the player graphic and vice versa and you're done. I don't really get the diagonal thingy? Can you show a screenshot? I will make a demo.

SBR*

Wait, I think I don't get you right. So you don't want something to swap places with an event?


Valdred

What SBR first suggested would work as well. Fool the player to believe that the player-character is an event and visa-versa by swapping locations and graphics.

Valdred

just put the two commands right after each others. Wont be noticed. ;)

SBR*

So do you want them to be switched, or do you want to switch what character is controlled?

SBR*

You got to lvl -2. Oh, and tried out my demo? That should do it.

SBR*

It should work :urgh:! Z is the button to switch btw.

Valdred

For some reason he made a decrypted project. Upload a new one

SBR*

June 05, 2010, 03:52:32 pm #10 Last Edit: June 05, 2010, 04:21:55 pm by SBR*
Just a nooby question, but what is a decrypted project?

EDIT: Ah, so that's what that button does. I always thought: "Well, why not include those 'encryptions'?"

New link: http://rapidshare.com/files/395670266/Transfer_controls_to_event_and_vice_versa.exe

Valdred

I ment enchrypted. sorry :D

SBR*

June 06, 2010, 06:54:38 am #12 Last Edit: June 06, 2010, 08:26:03 am by SBR*

SBR*

First I give you a system that doesn't change graphics, so it really gets switched. Then I give you a system that changes graphics, so it looks like you control the event. WHAT DO YOU WANT?!  >:(

nathmatt

this should work put this in a parallel process
e = $game_map.events[id]
$game_player.center(e.x, e.y)
change the id to the events id

run this after you turn off the parallel process
p = $game_player
$game_player.center(p.x, p.y)
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


nathmatt

June 06, 2010, 06:35:49 pm #15 Last Edit: June 06, 2010, 06:40:33 pm by nathmatt
edit working on it
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


nathmatt

here but im not sure if it is exactly in the center just call $game_map.events[id].follow = true
to turn it on and false to turn it off

Spoiler: ShowHide
class Game_Event < Game_Character
 
 def follow=(condition)
   @follow = condition
   if condition
     $game_player.center(@x, @y)
   else
     p = $game_player
     $game_player.center(p.x, p.y)
   end
 end
 
 alias follow_update update
 def update
   if moving?
     $game_map.display_x = @real_x - 1064
     $game_map.display_y = @real_y - 1064
   end
   follow_update
 end
 
end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Jragyn

I think it'd just be easier to create a dummy character or something with a spriteset the same as the event you want to take over, then just do a bit of event teleporting or something without fade to move around and voila.

A bright light can either illuminate or blind, but how will you know which until you open your eyes?

nathmatt

try this

Spoiler: ShowHide
class Game_Map
 
  attr_accessor :following
 
  def scroll_down(distance)
    return if following
    @display_y = [@display_y + distance, (self.height - 15) * 128].min
  end
 
  def scroll_left(distance)
    return if following
    @display_x = [@display_x - distance, 0].max
  end
 
  def scroll_right(distance)
    return if following
    @display_x = [@display_x + distance, (self.width - 20) * 128].min
  end
 
  def scroll_up(distance)
    return if following
    @display_y = [@display_y - distance, 0].max
  end
 
end

class Game_Event < Game_Character
 
  def follow=(condition)
    @follow = condition
    if condition
      $game_player.center(@x, @y)
      $game_map.following = true
    else
      p = $game_player
      $game_player.center(p.x, p.y)
      $game_map.following = false
    end
  end
 
  alias follow_update update
  def update
    if moving?
      $game_map.display_x = @real_x - 1064
      $game_map.display_y = @real_y - 1064
    end
    follow_update
  end
 
end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


nathmatt

Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script