LOGIN
SEARCH
PROFILE
keys: ↑ ↓
LOGOUT
INDEX
MEMBERS
keys: ↑ ↓
HOME
PORTAL
PLAY ALONG
PLAY with WORDS
PLAY with GRAPHICS
PLAY with SOUNDS
PLAY with CODES
PLAY with PROJECTS
keys: ← →
Guest Access
Register:
Members:



View previous topic View next topic Go down Message [Page 1 of 1]

Administrator
Administrator
#1 default RMXP = GSHOT (wip)
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
here's my attempt towards a simple shooter script
(which is not so simple to do)
this is to go with GPLAT and make it a simple but fun ABS.

I started with the way XAS teleports events from one map to another, I understand and got that part down but then it gets real tricky.
shooting direction and hitting other events and turning switches.

GSHOT v0.1 (wip)
Code:
#===============================================================================
# G-SHOT (wip) by G@MeF@Ce 8/3/2011
#===============================================================================
module GSHOT
  SHOT_KEY = Input::X #input
  #SHOT_SFX = "" #audio
  #SHOT_GFX = "" #character
  SHOT_MAP_ID = 1 #the map the event is on
  SHOT_EVENT_ID = 1 #the event id
  #SHOT_SWITCH = 0 #the switch of target event the shot will enable
  #SHOT_SPEED = 0 #the speed of the shot
  #SHOT_TIME = 0 #the time of the shot before it is deleted
end
#===============================================================================
# Scene Map
#===============================================================================   
class Scene_Map
  attr_accessor :spriteset
end
#===============================================================================
# Game Map
#===============================================================================
class Game_Map
  attr_reader  :events
end
#===============================================================================
# Game SelfSwitches
#===============================================================================
class Game_SelfSwitches
  def delete(key)
    @data.delete(key)
  end
end
#===============================================================================
# Interpreter
#===============================================================================
class Interpreter
  include GSHOT
      alias gshot update
#-------------------------------------------------------------------------
# update
#-------------------------------------------------------------------------
  def update
      gshot
      unless $game_system.map_interpreter.running? or
            @move_route_forcing or $game_temp.message_window_showing
      if Input.trigger?(SHOT_KEY)
      transfer_event(SHOT_MAP_ID,SHOT_EVENT_ID)
      return
      end
      $game_player.refresh
      end
  end
#-------------------------------------------------------------------------
# transfer_event
#-------------------------------------------------------------------------
  def transfer_event(mapid, eventid)
    map = load_data(sprintf("Data/Map%03d.rxdata", mapid))
    map.events[eventid].x = $game_player.x
    map.events[eventid].y = $game_player.y
    neweventid = $game_map.events.length+1
    map.events[eventid].id = neweventid
    $game_map.events[neweventid] = Game_Event.new($game_map.map_id, map.events[eventid])
    $scene.spriteset = Spriteset_Map.new
  end

end

I'm stuck at making the shot go the same direction the player is facing.

and flipping a switch of the target event.

study
Administrator
Show Signature


Hey Guest, check out my demos!
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]




G101's theme colors
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this image.]


shhh.... [You must be registered and logged in to see this link.]



[You must be registered and logged in to see this link.]
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
EVENTALIST
EVENTALIST
#2 default Re: RMXP = GSHOT (wip)
Loading

mr_wiggles

mr_wiggles
EVENTALIST
 EVENTALIST
EVENTALIST
profile
That's why in XAS you use the "step forward" move command, the event that is moved to the map gets turned in the same direction as the player (player facing left event is facing left.) This way when it steps forward it goes in the direction the player is facing.

In outbreak i use a more complex moving system that edits the event's real x and y variables for movement.

switches are as simple as this, when the event moves and its location changes have it check the map for events on its location then just have the script turn on the self switch in that event or the one(s) it hit.

I redid all the hit detections in WAX so its much faster then the old detection in XAS 3.72
EVENTALIST
Show Signature
EVENTALIST
Administrator
Administrator
#3 default Re: RMXP = GSHOT (wip)
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
I guess I'm missing or I need to remove something in this script...?

I have the event on the map setup for step forward, but when that event is transferred from that map to the current, it goes in the direction the graphic was chosen. *shrugs*

I will continue to study study

to make a script that when you press a button
transfers an event from another map in front on the player and goes the same direction the player is facing, erases when it hits a tile that is impassable or another event and turns that events page ~ is like a quest Cool there's alot of things I must gather, before I can slay this dragon of a script. Thanks wiggles I will continue to study study

WAX is b@D@$$ name for your engine +++
~ redid the hit detection? U R b@d@$$
Administrator
Show Signature


Hey Guest, check out my demos!
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]




G101's theme colors
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this image.]


shhh.... [You must be registered and logged in to see this link.]



[You must be registered and logged in to see this link.]
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch

Sponsored content

profile

View previous topic View next topic Back to top Message [Page 1 of 1]

 

Chatbox system disabled
Personal messaging disabled