Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Dannyboi1989

Rmxp actor graphic help

Question

Hey, this is my first posting on this site so i hope im at the right place.

Just wondering if anyone could help me with a couple of problems im running into

with my game. Basically what it is, my player starts out in water, portrayed by his swimming graphic,

and ive made an event where as soon as he steps out of the water his graphic changes to a walking

actor, but i cant seem to get it where if i walk back into the water his graphic changes back to swimming.

I hope im explaining this ok. The other problem is i have an npc on the map which i can talk to, is there any way of not being able to speak to him a 2nd time without his graphic dissapearing ? Ive made the the event where we have the conversation but the only thing i can seem to find to stop the event once weve had the convo is ERASE EVENT, but then that makes the npc dissapear ?

 

Hope someone can help me, Thanks in advance =)

Share this post


Link to post
Share on other sites

20 answers to this question

Recommended Posts

  • 0

I could help you with those eventing problems, it's just that I'm not really in the mood to event o.o....

Share this post


Link to post
Share on other sites
  • 0

For the swimming problem, I'll see if I can do something about it. I'll need to find a swimming graphic before I can try it though.

 

The other problem is i have an npc on the map which i can talk to, is there any way of not being able to speak to him a 2nd time without his graphic dissapearing ? Ive made the the event where we have the conversation but the only thing i can seem to find to stop the event once weve had the convo is ERASE EVENT, but then that makes the npc dissapear ?

 

You have to use switches (etc etc) to do that, so erase event is a bad idea here. Would a screenshot help? Also, I reccomend playing the RMVX School game, it helps with XP and VX.

Share this post


Link to post
Share on other sites
  • 0

Here are my 2 graphics im using if this helps ? Thanks

p.s a screenshot would be a massive help if thats okay ?

Thanks

post-21929-0-16265200-1328655545_thumb.png

post-21929-0-80229400-1328655566_thumb.png

Edited by Dannyboi1989

Share this post


Link to post
Share on other sites
  • 0

Here's a script I've had for a while that allows your chracter to change into a swimming character and back without any problems.

 

#####################################################
#Swimming System 2.0 By Amaranth & MCgamer
#Last updated March 12, 2009
#####################################################
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
class Game_Map
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
 #--------------------------------------------------------------------------
 # * Return terrain ID for a tile
 #--------------------------------------------------------------------------
 def terrain_tag(x, y)
   if @map_id != 0
  for i in [2, 1, 0]
    tile_id = data[x, y, i]
    if tile_id == nil
	  return 0
    elsif tile_id > 0
	  return @terrain_tags[tile_id]
    end
  end
   end
   return 0
 end
end

#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# establish possible swimmers
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
$swimmers = []
graphics = []
graphics = Dir.entries("Graphics/Characters")
for file in graphics
 if file.include?('-SWIM')
   #take out "swim" and file extension
   file.gsub!(/-SWIM.*/){||''}
   #add name to end of array
   $swimmers << file
 end
end

#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
class Game_Character
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
 #--------------------------------------------------------------------------
 # * Determine if Moving
 #--------------------------------------------------------------------------
 def moving?

 # SWIMMING: Should character swim?  
 check_terrain_type()	

   # If logical coordinates differ from real coordinates,
   # movement is occurring.   
   return (@real_x != @x * 128 or @real_y != @y * 128)

 end

 #--------------------------------------------------------------------------
 # * Check the terrain for the character
 #--------------------------------------------------------------------------
 def check_terrain_type()

   #get the terrain tag # upon which character is standing
   @terrain = $game_map.terrain_tag(@x, @y)

   #get the name of the character's graphic
   name = @character_name

   #check if character's swimming graphic is currently being used (nil if no)
   swim = name.match("-SWIM")

   #enter or exit water (change "3" to the tag you want for water)
   enter_water(swim) if @terrain == 4
   exit_water(swim) if @terrain != 4

 end 
 #--------------------------------------------------------------------------
 # * Enter the water (events only)
 #--------------------------------------------------------------------------
 def enter_water(swim)

   # Check if picture exists and not already swimming
   if swim == nil and $swimmers.include?(@character_name)

  # Switch to swimming graphic
  @character_name += "-SWIM"

  # Disable menu and save
  $game_system.menu_disabled = $game_system.save_disabled = true

  # Play splash sound
  Audio.se_play("Audio/SE/127-Water02", 50, 100)
  # Animate sprite
  @step_anime = true

  # Display swimming event
  $game_map.refresh

  return true

   end
 end
 #--------------------------------------------------------------------------
 # * Exit the water (events only)
 #--------------------------------------------------------------------------
 def exit_water(swim)
   # Check if picture is not walking sprite
   if swim != nil
  # don't animate player while not in motion
  @step_anime = false
  # Display walking player
  @character_name = @character_name.chomp("-SWIM")
  # Display walking event
  $game_map.refresh
  #Enable menu and save
  $game_system.menu_disabled = $game_system.save_disabled = false
   end
 end
end 

 

 

Just add the word -SWIM to the end of the characters graphic file name and there you go.

Share this post


Link to post
Share on other sites
  • 0

i copied all the script and pasted it into my script database but its pasting all of it onto one line ? shouldn't it look like above ?

and do i just literally change the actors graphic name to -SWIM at the end and thats it, it will automatically change from walking

actor to swimming actor everytime i step in and out of the water ? how does it know what actor graphic to change to once i step out

of the water ? do i have to change the walking actor graphics name aswell ?

Thanks a lot for this really appreciate it =)

Share this post


Link to post
Share on other sites
  • 0

I am not sure why it is copying onto one line, it should definitely look like it does above once it is inside your game.

As for how it knows you are swimming, it appears to use terrain tags to tell what type of ground the character is standing on.

To set a certain tile to a specific terrain tag you must go to the tilesets tab in the database, and then select the terrain tag button on the right side. You should now see a bunch of numbers(most likely all zero) over each tile on that tile set. By left click you can increase the number and right clicking will decrease it. You can set the tiles to any number from 0 to 7.

I believe the script is set to run off of number 4.

Once your terrain tag is set to the correct number for all desired maps with water tiles the script should work perfectly.

Hope that helps.

-Cheers,

Jon Bon

Share this post


Link to post
Share on other sites
  • 0

First, stop creating a new line in your post. It's irratating to read.

 

Second, for some reason this forum puts the whole script into one line. So what you do is first put it into Microsoft Word and then copy and paste it from there into the Script Database.

 

Third, Here's a example:

001-Fighter01 (Original RMXP file)

001-Fighter01-SWIM (Custom swim file)

Once you step in water your character will switch into the swim file.

 

Fourth, I forgot to tell you that you need to change the terrain Tag in the tileset Database to 3 or 4. Just put it over the water tile that you want your character to swim.

Share this post


Link to post
Share on other sites
  • 0

Nope, still wont paste it like shown above... its still pasting all onto 1 line, cant figure it out. Tried it a few times now fie.gif

Share this post


Link to post
Share on other sites
  • 0

Nope, still wont paste it like shown above... its still pasting all onto 1 line, cant figure it out. Tried it a few times now fie.gif

 

You put it in Microsoft Word right, as that always works for me.

Share this post


Link to post
Share on other sites
  • 0

Thanks man its working great, really appreciate your help, p.s sorry about the new lines, didnt realise i was doing them

Share this post


Link to post
Share on other sites
  • 0

Sorry about the wait, notebook kinda sucks. Okay, here are two screenshots. Now, I didn't make it complicate and I only know you have a "graphic disappearing" problem, so that's what I worked for. If it helps, but not fully, just tell me what kind of event you are trying and I can offer help for it.

 

244v2c4.jpg

 

NOTES: For the above picture, you can see that I underlined something in red. This is a very important option that will help you in the long run of setting up events. "Control self switch" is an option you can find in the events tabs, and has some multiple selections: A, B, C (etc). Now, in my opinion and I'm not an expert at it, is to start with A if you have a NPC doing multiple things.

 

Anyways, what you want to do is make your event and the NPC's actions or text after you select a sprite/graphic for it to work. Next, if you want it to be activated by action button, select it or another "Trigger" you want as the way to start the event. Once you have done that, head to the left in the empty field and fill in your events/text. Next, put a Control Self Switch in AFTER all the other events, text etc etc.

 

Now create a NEW PAGE on that event. You should see a completely blank page now.

 

 

2ppbvv4.jpg

 

NOTES: As you can see in the image above, I boxed one thing and highlighted another. Let us take care of the red field first. Find the graphic you selected on the first page (unless the event is your actor morphing into a beast etc etc then select THAT sprite here) and then CHECK SELF CONTROL SWITCH and find the alphabet letter you select on the first page (should be A, especially if you followed the images) and then hit "APPLY".

 

Now go to the empty field text and start up your events, text, music or what you want the character to do. Now hit "APPLY" once more, and test the event.

 

The first time you talk to the NPC, they should say something. And then when you talk to the NPC the second time, they say something completely different and no longer offer the first text selection. And the graphic should still be there.

 

Does that work?

Edited by CrimsonInferno

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...