RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Request] Smart Monsters

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 87
Hell Hath No Fury
In my next game, The Forbiden Gate, The monsters will run at you and attempt to touch you, which opens a battle. Can I get something like this?
Like, one time, I played RPG Maker, and I liked it.

***
Rep:
Level 90
Skilled Scripter, Shitty Mapper, Decent Writer.
Easily done in the event. Under the "Movement Pattern" in the event, just set "Type" to "Follow Hero". I would recommend setting the movement speed of the event to be a little slower than the player so there is a chance of evading encounters.

*
A Random Custom Title
Rep:
Level 96
wah
I think this is what you're looking for:
http://rmrk.net/index.php/topic,13278.0.html The fourth post on that, there's a script that helps with this. If you don't understand how to use the code, just use the demo posted at the bottom of the guy's post.

**
Rep: +0/-0Level 87
Yeah I can't get the script to work without downloading the mod and running from there but at the same time the mod maker edited the graphics turning the hp/mp numbers in gradient bars which throws off the larger battle group size I was going for. I admit, I have no idea how to script. I'd like to either know how to make the chasing monster script work or how to change the gradient bars back to numbers. Thank you.

***
Rep:
Level 88
Hell... What did I mess up now... I'm Back!
the script would not work because it requires the SDK... >.> (I hate SDK's... so...)

use this script. =) (its version 2.0, the one in that demo... and the demo has an addition to give the gradient, the script doesn't add that)

Code: [Select]
#==============================================================================
#   Veiw Range Script
#    VERSION 2
#    By: Near Fantastica
#    Date: 07/04/05
#==============================================================================
# HOW TO GIVE EVENTS A SIGHT RANGE:
#1. Make an event with 2 pages
#2. Make page 1 a Parallel Process
#3. Make a New page
#4. Make Page 2 have Local Switch "A"
#5. Then Just insert the following into the First page with Call Script
#       $view_range.enemies_view(EVENT ID, VIEW RANGE, "LOCAL SWITCH TO TURN ON")
# EX: $view_range.enemies_view(1, 8, "A")
#==============================================================================
#==============================================================================
# HOW TO GIVE EVENTS A SOUND RADIUS:
#1. Make an event
#2. Make it a Parallel Process
#3. Then Just insert the following into the event with Call Script
#       $view_range.event_sound(EVENT_ID, "BGS_FILENAME.EXTENTION")
# EX: $view_range.event_sound(1, "011-Waterfall01.ogg")
#
# NOTE: BGS File must be in "/Audio/BGS/"
#
#==============================================================================
class View_Range
 #--------------------------------------------------------------------------
 #    Range system works by sereching the area of a circle for the Player's xy
 #    The Veiw is set in each event and is the radius of the circle
 #    The Eaquation used is (Px-EX)^2 + (Py-Ey)^2 = radius^2
 #    If the Radius is less than or equal to the View the Player is inside the circle
 #--------------------------------------------------------------------------
 def initialize
   @playing_bgs = []
   @bgs = BGS.new
   @bgs.pitch = 100
   @event_id = 0
   @event_locial_switch = ""
   @view_range = 0
   @playerx = 0
   @playery = 0
   @eventx = 0
   @eventy = 0
   @event_direction = 0
 end
 #--------------------------------------------------------------------------
 #     Max Sound Effect Range is 8 units DO NOT OVER LAP
 #     or it will go into super lag mode you have been warned
 #     This is because you are trying to play 2 different sound
 #     effects and will cycles between them
 #
 #     Note : This overrides the maps default sound effect
 #--------------------------------------------------------------------------
 def event_sound(event_id, bgs_name)
   @bgs.name = bgs_name
   @event_id = event_id
   @playerx = $game_player.x
   @playery = $game_player.y
   @eventx = $game_map.events[@event_id].x
   @eventy = $game_map.events[@event_id].y
   @event_direction = $game_map.events[@event_id].direction
   radius = (@playerx-@eventx)*(@playerx-@eventx) + (@playery-@eventy)*(@playery-@eventy)
   if radius > 64
     if @playing_bgs[event_id] != nil
       @playing_bgs[event_id] = nil
       $game_system.bgs_fade(1)
       return
     end
   elsif radius <= 64 and radius > 49
     if @playing_bgs[event_id] == nil
       @bgs.volume = 30
       @playing_bgs[event_id] = @bgs
       $game_system.bgs_play(@bgs)
       return
     end
     @bgs.volume = 30
     if @bgs.volume != @playing_bgs[event_id].volume or
         @bgs.name != @playing_bgs[event_id].name
       @playing_bgs[event_id] = @bgs
       $game_system.bgs_play(@bgs)
       return
     end
   elsif radius <= 49 and radius > 36
     @bgs.volume = 40
     @playing_bgs[event_id] = @bgs
     $game_system.bgs_play(@bgs)
     return
   elsif radius <= 36 and radius > 25
     @bgs.volume = 50
     @playing_bgs[event_id] = @bgs
     $game_system.bgs_play(@bgs)
     return
   elsif radius <= 25 and radius > 16
     @bgs.volume = 60
     @playing_bgs[event_id] = @bgs
     $game_system.bgs_play(@bgs)
     return
   elsif radius <= 16 and radius > 9
     @bgs.volume = 70
     @playing_bgs[event_id] = @bgs
     $game_system.bgs_play(@bgs)
     return
   elsif radius <= 9 and radius > 4
     @bgs.volume = 80
     @playing_bgs[event_id] = @bgs
     $game_system.bgs_play(@bgs)
     return
   elsif radius <= 4 and radius > 1
     @bgs.volume = 90
     @playing_bgs[event_id] = @bgs
     $game_system.bgs_play(@bgs)
     return
   elsif radius = 1
     @bgs.volume = 100
     @playing_bgs[event_id] = @bgs
     $game_system.bgs_play(@bgs)
     return
   end
 end
 #--------------------------------------------------------------------------
 def enemies_view(event_id, view_range, els)
   @event_id = event_id
   @view_range = view_range
   @event_locial_switch = els
   @playerx = $game_player.x
   @playery = $game_player.y
   @eventx = $game_map.events[@event_id].x
   @eventy = $game_map.events[@event_id].y
   @event_direction = $game_map.events[@event_id].direction
   if @event_direction == 2
     if @playery >= @eventy
       radius = (@playerx-@eventx)*(@playerx-@eventx) + (@playery-@eventy)*(@playery-@eventy)
       if radius <= @view_range
         key=[$game_map.map_id, @event_id, @event_locial_switch]
         $game_self_switches[key] = true
         $game_map.need_refresh = true
       end
     end
   end
   if @event_direction == 4
     if @playerx <= @eventx
       radius = (@playerx-@eventx)*(@playerx-@eventx) + (@playery-@eventy)*(@playery-@eventy)
       if radius <= @view_range
         key=[$game_map.map_id, @event_id, @event_locial_switch]
         $game_self_switches[key] = true
         $game_map.need_refresh = true
       end
     end
   end
   if @event_direction == 6
     if @playerx >= @eventx
       radius = (@playerx-@eventx)*(@playerx-@eventx) + (@playery-@eventy)*(@playery-@eventy)
       if radius <= @view_range
         key=[$game_map.map_id, @event_id, @event_locial_switch]
         $game_self_switches[key] = true
         $game_map.need_refresh = true
       end
     end
   end
   if @event_direction == 8
     if @playery <= @eventy
       radius = (@playerx-@eventx)*(@playerx-@eventx) + (@playery-@eventy)*(@playery-@eventy)
       if radius <= @view_range
         key=[$game_map.map_id, @event_id, @event_locial_switch]
         $game_self_switches[key] = true
         $game_map.need_refresh = true
       end
     end
   end
 end
end
#======================================================
class Scene_Title
 #--------------------------------------------------------------------------
 alias vr_scene_title_update update
 #--------------------------------------------------------------------------
def update
  $view_range = View_Range.new
  vr_scene_title_update
end
end
#======================================================
class Game_System
   attr_accessor :playing_bgs
end
#======================================================
class BGS
 #--------------------------------------------------------------------------
 attr_accessor :name
 attr_accessor :volume
 attr_accessor :pitch
 #--------------------------------------------------------------------------
 def initialize
   @name
   @volume
   @pitch
 end
end
#======================================================
class Game_Map
 #--------------------------------------------------------------------------
 attr_accessor :map
end

there you go...
----Current Games working on----
--Rage O' Delusion - Overall Percentage Finished : 4% -- Expected release... Unknown
--The Other Dimension - Overall Percentage done : 1 - Expected Release : No time soon...
v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^
Feildmaster Productions
Made By One Man Run by the Same...
Making Games for Everyone...
Oh yeah, and everything else web based
For a charge... Of course...

**
Rep: +0/-0Level 87
Doesn't seem to be working. The game loads fine but when I put an event in that calls on the script it gives me the error message

???? 'View/Sound Range'? 128 ??? NoMethodError ?????????
undefined method 'x'for nil:NilClass
« Last Edit: April 07, 2007, 11:13:20 PM by Darkauthor »

*******
Rep:
Level 90
Returned from the dead.
Why don't you just use Shinami's method? It's much simpler...
Sincerely,
Your conscience.

**
Rep: +0/-0Level 87
Well that method would make every monster on the map always follow the hero. It would get rather messy not to mention if there isn't anything to bar them they'd come all at once. This script here is rather cool in that it gives a proximity to the monster's awareness avoiding the all at once charge and allowing heroes to sneak around them if they wish to avoid battles.

***
Rep:
Level 88
Make each encounter a different event that has a switch so when it's defeated, it goes away. It'd require alot of switches but it'd work.

**
Rep:
Level 87
You could make invisible events around the monster that when hit changes the monster to follow hero. It would require a ton of switches; at least one per enemy, but it would work.

**
Rep: +0/-0Level 87
Hah! I found the script that made the gradient bars. I fixed it... despite having no idea what I'm doing! Mwa ha ha ha ha ha! The Power of determination and logic prevails yet again! I just took unmodified scripts and slowly replaced the scripts in the mod with them untill 1: Something broke (telling me that that was something he touched and I should look at it) or 2: the gradient bar script got overwritten.
« Last Edit: April 09, 2007, 04:29:57 AM by Darkauthor »