Rpg²S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Vai al contenuto

Rpg²S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Screen Contest #90

Kamikun






  • Si prega di effettuare il log in prima di rispondere
Platform problema

    Doom2103
  • Nuovo Arrivato

  • Utenti
  • Rens: 0
  • 0
  • Stelletta
  • 5 messaggi

#1 Inviato 15 March 2012 - 14:22 PM

Eccomi con un nuovo problema... Ho trovato su internet questo Script che permette di rendere il gioco totalmente Platform:
(Lo posto anche per permettere a qualcuno interessato di utilizzarlo)

=begin
================================================================================
Amethyst Platform System - Version 1.2 RMVX - 25/03/2010
================================================================================
--------------------------------------------------------------------------------
Credits
--------------------------------------------------------------------------------
Created by Khas. Translation by Avatar176.
All Amethyst scripts are licensed under a Creative Commons
All Amethyst scripts can only be used in non-commercial projects,
If use in commercial project please send a PM with the request.
--------------------------------------------------------------------------------
Features
--------------------------------------------------------------------------------
The Amethyst System Platform Selected maps transforms the constant
Amp_System_Maps (see the "configuration) in platform-style maps.
--------------------------------------------------------------------------------
Instructions/Installation
--------------------------------------------------------------------------------
1 - Paste this script above all the additional scripts
2 - Set it in the configuration
--------------------------------------------------------------------------------
Instructions - Creating The Maps
--------------------------------------------------------------------------------
The tiles are not passable and the platform where the tiles are passable
the character can fall  jump. The events also suffer map action
gravity of the system, ie, fall into holes too
--------------------------------------------------------------------------------
Configuration
--------------------------------------------------------------------------------
=end
module Amp_Config
  # Maps that will be platform style, place the ID within the [], separated by commas
  Amp_System_Maps = [1,2,8,9,10,12,13,14,15,17,18,19,20,22,23,24,25,26,27,28,32,30,33,34,35,36,37,38,39,40,41,
  42,43,46]
  # Force of gravity, varies from 0 ~ 2
  GForce = 1
  # Key to Jump
  Jump_Key = Input::X
  # Force Leap, values from 0 ~ 5
  Jump_Force = 1
  # Sound to play when you jump
  Jump_Sound = "Jump1"
end
#-------------------------------------------------------------------------------
#	   Do not change anything below unless you know what you're doing!
#-------------------------------------------------------------------------------
$Amethyst_Scripts = {} if $Amethyst_Scripts.nil?
$Amethyst_Scripts["Am Platform System"] = ["1.2","25/03/2010"]
class Game_Character
  alias amp_original_initialize initialize
  alias amp_original_update update
  alias amp_original_move_up move_up
  alias amp_original_move_down move_down
  alias amp_original_move_left move_left
  alias amp_original_move_right move_right
  alias amp_original_move_random move_random
  alias amp_original_turn_random turn_random
  alias amp_original_move_toward_player move_toward_player
  alias amp_original_move_away_from_player move_away_from_player
  def amp_map?
	$game_map.nil? ? i = false : i = Amp_Config::Amp_System_Maps.include?($game_map.map_id)
	return i
  end
  def initialize
	if amp_map?
	  @gforce = false; @nforce = false; @sforce = nil
	end
	amp_original_initialize
  end
  def update
	amp_original_update
	return unless amp_map?
	force_gravity if @gforce
	stop_gravity_force if @nforce
  end
  def force_gravity
	return if moving?
	@move_speed = Amp_Config::GForce+4
	@y = $game_map.round_y(@y+1)
	@real_y = (@y-1)*256
	if passable?(@x, @y+1); @gforce = true
	  else; @nforce = true; @gforce = false
	end
  end
  def check_gravity_force
	if passable?(@x, @y+1)
	  @sforce = @move_speed
	  @gforce = true
	  @walk_anime = false
	else
	  check_event_trigger_touch(@x, @y+1)
	end
  end
  def stop_gravity_force
	return if moving?
	@nforce = false
	@gforce = false
	@walk_anime = true
	@move_speed = @sforce
	@sforce = nil
  end
  def move_up(turn_ok = true)
	amp_map? ? amp_move_up(turn_ok) : amp_original_move_up(turn_ok)
  end
  def move_down(turn_ok = true)
	amp_map? ? amp_move_down(turn_ok) : amp_original_move_down(turn_ok)
  end
  def move_left(turn_ok = true)
	amp_map? ? amp_move_left(turn_ok) : amp_original_move_left(turn_ok)
  end
  def move_right(turn_ok = true)
	amp_map? ? amp_move_right(turn_ok) : amp_original_move_right(turn_ok)
  end
  def move_random
	amp_map? ? amp_move_random : amp_original_move_random
  end
  def move_toward_player
	amp_map? ? amp_move_toward_player : amp_original_move_toward_player
  end
  def move_away_from_player
	amp_map? ? amp_move_away_from_player : amp_original_move_away_from_player
  end
  def turn_random
	amp_map? ? amp_turn_random : amp_original_turn_random
  end
  def amp_move_up(turn_ok)
	if passable?(@x, @y-1)
	  @y = $game_map.round_y(@y-1)
	  @real_y = (@y+1)*256
	  increase_steps
	  @move_failed = false
	else
	  check_event_trigger_touch(@x, @y-1)
	  @move_failed = true
	end
  end
  def amp_move_down(turn_ok)
	if passable?(@x, @y+1)
	  @y = $game_map.round_y(@y+1)
	  @real_y = (@y-1)*256
	  increase_steps
	  @move_failed = false
	else
	  check_event_trigger_touch(@x, @y+1)
	  @move_failed = true
	end
  end
  def amp_move_left(turn_ok)
	if passable?(@x-1, @y)
	  turn_left if turn_ok
	  @x = $game_map.round_x(@x-1)
	  @real_x = (@x+1)*256
	  increase_steps
	  check_gravity_force
	  @move_failed = false
	else
	  turn_left if turn_ok
	  check_event_trigger_touch(@x-1, @y)
	  @move_failed = true
	end
  end
  def amp_move_right(turn_ok)
	if passable?(@x+1, @y)
	  turn_right if turn_ok
	  @x = $game_map.round_x(@x+1)
	  @real_x = (@x-1)*256
	  increase_steps
	  check_gravity_force
	  @move_failed = false
	else
	  turn_right if turn_ok
	  check_event_trigger_touch(@x+1, @y)
	  @move_failed = true
	end
  end
  def amp_move_random
	case rand(2)
	when 0;  move_left(false)
	when 1;  move_right(false)
	end
  end
  def amp_move_toward_player
	sx = distance_x_from_player
	return if sx == 0
	sx > 0 ? move_right : move_left
  end
  def amp_move_away_from_player
	sx = distance_x_from_player
	return if sx == 0
	sx > 0 ? move_right : move_left
  end
  def amp_turn_random
	case rand(2)
	when 0; turn_right
	when 1; turn_left
	end
  end
end

class Game_Player < Game_Character
  alias amp_2original_initialize initialize
  alias amp_2original_update update
  alias amp_2original_move_by_input move_by_input
  def initialize
	amp_2original_initialize
	@jforce = 0
  end
  def update
	amp_2original_update
	update_jump_force if amp_map? and !@gforce
  end
  def update_jump_force
	if @jforce > 0
	  return if moving?
	  if @jforce > 1
		if Input.press?(Input::RIGHT)
		  turn_right
		  jump_upper_right
		elsif Input.press?(Input::LEFT)
		  turn_left
		  jump_upper_left
		else
		  jump_up
		end
	  else
		@move_speed = 4
		@walk_anime = true
		check_gravity_force
	  end
	  @jforce -= 1
	else
	  if Input.trigger?(Amp_Config::Jump_Key)
		RPG::SE.new(Amp_Config::Jump_Sound,80).play
		dash? ? @jforce = 4+Amp_Config::Jump_Force : @jforce = 3+Amp_Config::Jump_Force
		@move_speed = 5
		@walk_anime = false
		@pattern = 0
	  end
	end
  end
  def force_gravity
	return if moving?
	@move_speed = Amp_Config::GForce+4
	if Input.press?(Input::RIGHT)
	  turn_right
	  gforce_lower_right
	elsif Input.press?(Input::LEFT)
	  turn_left
	  gforce_lower_left
	else
	  @y = $game_map.round_y(@y+1)
	  @real_y = (@y-1)*256
	end
	check_touch_event
	if passable?(@x, @y+1); @gforce = true
	  else; @nforce = true; @gforce = false
	end
  end
  def gforce_lower_left
	if (passable?(@x, @y+1) and passable?(@x-1, @y+1)) or
	   (passable?(@x-1, @y) and passable?(@x-1, @y+1))
	  @x -= 1
	  @y += 1
	else
	  @y = $game_map.round_y(@y+1)
	  @real_y = (@y-1)*256
	end
  end
  def gforce_lower_right
	if (passable?(@x, @y+1) and passable?(@x+1, @y+1)) or
	   (passable?(@x+1, @y) and passable?(@x+1, @y+1))
	  @x += 1
	  @y += 1
	else
	  @y = $game_map.round_y(@y+1)
	  @real_y = (@y-1)*256
	end
  end
  def jump_up
	if passable?(@x, @y-1)
	  @y = $game_map.round_y(@y-1)
	  @real_y = (@y+1)*256
	  @move_failed = false
	else
	  check_event_trigger_touch(@x, @y-1)
	  @move_failed = true
	  @jforce = 0
	  check_gravity_force
	end
  end
  def jump_upper_left
	unless @direction_fix
	  @direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)
	end
	if (passable?(@x, @y-1) and passable?(@x-1, @y-1)) or
	   (passable?(@x-1, @y) and passable?(@x-1, @y-1))
	  @x -= 1
	  @y -= 1
	else
	  jump_up
	end
  end
  def jump_upper_right
	unless @direction_fix
	  @direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)
	end
	if (passable?(@x, @y-1) and passable?(@x+1, @y-1)) or
	   (passable?(@x+1, @y) and passable?(@x+1, @y-1))
	  @x += 1
	  @y -= 1
	else
	  jump_up
	end
  end
  def move_by_input
	amp_map? ? amp_move_by_input : amp_2original_move_by_input
  end
  def amp_move_by_input
	return if @gforce
	return unless movable?
	return if $game_map.interpreter.running?
	case Input.dir4
	when 4; move_left
	when 6; move_right
	end
  end
end

Il mio problema è che non riesco a capire come disattivare lo script in alcune mappe... e il post dove l'ho trovato è stato eliminato T.T
Potete aiutarmi dicendomi se c'è un modo per creare un codice da inserire in un evento per permettere la disattivazione dello script?
Grazie in anticipo a tutti...

Modificato da Doom2103, 15 March 2012 - 14:23 PM.


    giver
  • Alex (Rm2k)

  • Utenti
  • Rens: 121
  • 0
  • StellettaStellettaStellettaStellettaStelletta
  • 1291 messaggi
  • Sesso:Maschio
  • Provenienza:The Creept - Room for Strangeness
  • Abilità:Esperto

#2 Inviato 15 March 2012 - 14:36 PM

Devi configurare lo script . . . Ossia devi inserire in una lista apposita, nella sezione Configurazione dello script, gli ID delle mappe dove vuoi il platform attivo . . . Nelle altre, da quello che dice, non verrà usato . . .

Spoiler

    Guardian of Irael
  • Coniglietto Rosso

  • Rpg²S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58413 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilità:Apprendista


#3 Inviato 15 March 2012 - 14:36 PM

Verso l'inizio quando ti dice

# Maps that will be platform style, place the ID within the [], separated by commas
Amp_System_Maps = [1,2,8,9,10,12,13,14,15,17,18,19,20,22,23,24,25,26,27,28,32,30,33,34,35,36,37,38,39,40,41,
42,43,46]


quelli tra parentesi sono gli ID delle mappe di gioco, basta togliere il numero relativo alla mappa nella quale non vuoi il sistema platform! ^ ^

EDIT: anticipato di nuovo oggi D: ^ ^

(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Doom2103
  • Nuovo Arrivato

  • Utenti
  • Rens: 0
  • 0
  • Stelletta
  • 5 messaggi

#4 Inviato 15 March 2012 - 15:06 PM

Grazie mille ^ ^ Siete grandissimi ;) Però una cosa... Ho creato la mappa e all'interno, tramite "ABS.9", ho inserito i nemici... per far saltare il personaggio ho dovuto settare il "vuoto" con il "o" invece che con "X", però i nemici adesso se ne vanno in giro volando... ora: non c'è un modo per far si che quei cosi non se ne vadano in giro volando? infondo non sono stati inseriti tramite Evento
Scusate se ancora rompo... è che come ho detto non sono Scripter e mi trovo un po impicciato per via di questo Script ^ ^
Grazie ancora per la pazienza e per le risposte ^ ^

Modificato da Doom2103, 15 March 2012 - 22:54 PM.





  • Feed RSS