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

general gun fighting

Question

hi guys, ok so what i need help with is-

 

i need to make an event eg. enemy have health without having to go to battle scene and this has to be changeable to increase or decrease health after an event or time-phase.

 

second i need one for the hero, to change to a diffent sprite, eg. gun starts spraying bullets, and i need this to be on the action of a keyboard key, and at the same time i need this to decrease the enemy events outer battle health by a certain amount that is change-able, eg. on the switch of a weppon, and i need this to effect in the direction that your character is faccing, if you only know a way for it to affect with a certain range of the enemy event that is fine, please if anyone knows how i may do this then do post :)

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

I think what you are looking for is an ABS Battle System. There's one by Mr.Mo in the forum resources. You can go check that out.

 

At first it may be a bit confusing, but just make sure that when you implement the script into your game, don't forget to copy all picture/gradients that you find in the demo. You may also be alerted to have a "Characterset"_hit/_cast, just make sure you have them.

 

http://www.rmxpunlimited.net/resources/scripts/item/mrmos-abs-v45?category_id=11

 

Good luck ;D

Share this post


Link to post
Share on other sites
  • 0

thanks, iv read the features and it sounds perfect for the job, if not better, i will download it when vi finish work :P

Share this post


Link to post
Share on other sites
  • 0

Glad to help ^^ A few days ago I was asking a similar question xD If you have any questions or problems with the script, feel free to ask. I think I can somehow help :D

Share this post


Link to post
Share on other sites
  • 0

hey man, ok so i have set it up properly and exported every script and every piece of data to my project, i have an event in top left set to activate the abs on auto run, then it activates self switch a to go to a blank command so its not repeating itself, but im getting an error message on my game launch...

 

Script 'Mr.Mo's ABS V4.5' line 495 NoMethodError occured.

 

undefined method`each'for 1:Fixnum

 

... any ideas?

Share this post


Link to post
Share on other sites
  • 0

Well, you don't need an event to turn the ABS on. You create an event that will act as the Enemy using comments with the layout shown in Mr. Mo's Helpfile. It should look something like this.

 

>@ Comment: ABS [initiate ABS]

>@ Comment: ID 1 [The number is the ID of enemy which can be found in the database, in this case, 1, is a Ghost]

>@ Comment: Behavior 2 [0 = Dummy 1= See Range (Will attack if sees enemy) 2= Hear Rage (Will attack if hears enemy)

[3 = See or Hear Range 4 = Ally Under Attack]

>@ Comment: Sight 1 [The range the enemy can see, in this case, one tile ]

>@ Comment: Hear 1 [ The range the enemy can hear. Any movement without 'Sneak' makes a sound]

>@ Comment: ClosestEnemy true [The monster will/will not attack the closest enemy, to disable it, change 'true' to

['false']

>@ Comment: HateGroup [0] [ The number sets the enemies of this event which it will attack. [0] is the player.

[ 0 can be changed into other enemies by changing 0 into the ID, this way, you can

[ have NPCs battle other NPCs. To add multiple HateGroups, seperate each ID with a ',']

>@ Comment: Aggressiveness 1 [ How fast the enemy will attack]

>@ Comment: Speed 1 [ How fast the enemy will be in battle]

>@ Comment: Frequency 1 [ The rate the enemy will move while in battle]

>@ Comment: Trigger 0 [ Refer to the helpfile for this...too tedious to explain e_e]

>@ Comment: Respawn 5 [ The time it takes(In seconds) for the enemy to respawn.]

 

It's a bit messy with the explanations so I'll put the page without them below.

 

>@ Comment: ABS

>@ Comment: ID 1

>@ Comment: Behavior 2

>@ Comment: Sight 1

>@ Comment: Hear 1

>@ Comment: ClosestEnemy true

>@ Comment: HateGroup [0]

>@ Comment: Aggressiveness 1

>@ Comment: Speed 1

>@ Comment: Trigger 0

>@ Comment: Respawn 5

 

This means that a Ghost will only attack the player, and will only attack the player if it hears the player 1 tiles away with an aggressiveness of 1, speed of 1 and will respawn every 5 seconds.

Edited by Gergoth

Share this post


Link to post
Share on other sites
  • 0

its cool man i got it working, this is ace :) just wondering does and enemy's skills determine the type of attack it does on you if so how do i set animation for the skills, i have activated enemy animations and imported files with the correct names ect. so they have hit animations and so on but i want some to only shoot me, many thanks again i am going to have fun with this mod :D

Share this post


Link to post
Share on other sites
  • 0

Well, you can set the enemies' skills in the 'Enemies' tab in the Database, first you just go to that tab, secondly, if you look near the bottom, there's a box that is separated into 2 sections, 'Action' and 'Condition'.

 

To edit the skills, simply :

->Double click a row

-> Select the 'Skill' option

-> Set the rating [Frequency of use]

-> Badabing! You have set a skill for an enemy!

 

To set skill animations to the skills itself, go to your Database and select the 'Skills' Tab. There you have all the default skills + your personal skills. With that, select any random skill and look for two boxes called 'User Animation' and 'Target Animation'. There you can set all the animation that you have or created in the 'Animations' tab to your skills. User Animations are the animations that appear on the player, such as when you cast a spell, runes or whatever thingamajigs will appear. Target Animations are the animations that appear on your enemy, pretty straight forward.

 

For your next question, I'm not quite sure what you are asking, but if you want an enemy to only attack you, just set their HateGroup to HateGroup [0] and that should solve your problem.

 

I hope this helps, good luck.

Share this post


Link to post
Share on other sites
  • 0

Cool iv got to grips with it, when I said I wanted them to only shoot me I should have been more specific, I want the bullet sprite to travel to my player and then do damage animation, iv got the events skill to the shoot only so it doesn't do skills not applicable for Its purpose but I also want it to keep it's range from me as when it's shooting it still moves towards my player, it's ok as it is now but if I do succeed in making bullet to travel to my player it won't be effective if the enemy has come right up to me

Share this post


Link to post
Share on other sites
  • 0

Also I want to get rid of the day time or control it so I can change time by event and make it fade my colours at certain times to give the affect of it been day and night, as it seems pretty pointless it been there at the minute :)

Share this post


Link to post
Share on other sites
  • 0

Well, first of all, here's a time of day script made by Leon.

 

#===============================================================================
#  Check_Time, By Leon_Westbrooke
#-------------------------------------------------------------------------------
#  Details:
#       Will automatically change the tint of maps that it is called on based on
#       the computer's internal clock.
#
#  Instructions:
#       Place script above main, but below other default scripts.
#       On each map you want the tint set by this script, make an event as follows:
#        [Parallel Process Event]
#         Turn on switch 3
#         Loop
#               Script... Check_Time.new
#               Wait 1 frame
#         End Loop
# 
#  Notes:
#       You must set a switch to change this parallel process if you wish to change
#       the tint of the screen on that map.
#
#===============================================================================
class Check_Time
 def initialize
       @time_stamp = Time.new
       if $game_switches[3] == false
         if @time_stamp.strftime("%H").to_i < 6 or @time_stamp.strftime("%H").to_i > 20
               red = -100
               green = -100
               blue = -90
               $game_screen.start_tone_change(Tone.new(red, green, blue, 20), 120)
         elsif @time_stamp.strftime("%H").to_i > 5 and @time_stamp.strftime("%H").to_i < 9
               red = -60
               green = -42
               blue = -60 
               $game_screen.start_tone_change(Tone.new(red, green, blue, 15), 120)
         elsif @time_stamp.strftime("%H").to_i > 8 and @time_stamp.strftime("%H").to_i < 18
               red = 0
               green = 0
               blue = 0
               $game_screen.start_tone_change(Tone.new(red, green, blue, 0), 120)
         elsif @time_stamp.strftime("%H").to_i >17 and @time_stamp.strftime("%H").to_i  < 21
               red = -40 
               green = -60 
               blue = -60 
               $game_screen.start_tone_change(Tone.new(red, green, blue, 15), 120)
         end
       else
         if @time_stamp.strftime("%H").to_i < 6 or @time_stamp.strftime("%H").to_i > 20
               red = -100 
               green = -100 
               blue = -90 
               $game_screen.start_tone_change(Tone.new(red, green, blue, 20), 0)
               $game_switches[3] = false
         elsif @time_stamp.strftime("%H").to_i > 5 and @time_stamp.strftime("%H").to_i < 9
               red = -60 
               green = -42 
               blue = -60 
               $game_screen.start_tone_change(Tone.new(red, green, blue, 15), 0)
               $game_switches[3] = false
         elsif @time_stamp.strftime("%H").to_i > 8 and @time_stamp.strftime("%H").to_i < 18
               red = 0
               green = 0
               blue = 0
               $game_screen.start_tone_change(Tone.new(red, green, blue, 0), 0)
               $game_switches[3] = false
         elsif @time_stamp.strftime("%H").to_i >17 and @time_stamp.strftime("%H").to_i  < 21
               red = -42 
               green = -60 
               blue = -60 
               $game_screen.start_tone_change(Tone.new(red, green, blue, 15), 0)
               $game_switches[3] = false
         end
       end
 end
end

 

All credits to him

 

Secondly,I'm don't think you can stop the enemy from approaching you, but you can try restricting the movement of the event by Fixing it's movement, although it prevents the enemy from approaching you, it kinda prevents the enemy form moving at all.

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...