Page 1 of 1

I need help modding

PostPosted: Sun May 01, 2016 20:13
by TailsTheFoxDoes MT
I need some help to make a mod:
First, i need to know, what type of fighting is there besides dogfight? And will i have to put extra code for these fighting types to work?

OFFTOPIC:
Has anyone played Zombie Tsunami?

Re: I need help modding

PostPosted: Sun May 01, 2016 20:32
by MineYoshi
[quote="TailsTheFoxDoes MT"
OFFTOPIC:
Has anyone played Zombie Tsunami?[/quote]

Nope.

Re: I need help modding

PostPosted: Mon May 02, 2016 11:03
by azekill_DIABLO
all types of fight i know is dogshoot (follows you and shot when in range<<=can be modified)
and dogfight :)

Re: I need help modding

PostPosted: Sun May 08, 2016 23:20
by TailsTheFoxDoes MT
azekill_DIABLO wrote:all types of fight i know is dogshoot (follows you and shot when in range<<=can be modified)
and dogfight :)

Yyeess i needed to know how to make them shoot but don't you need to query in what texture the shot uses and if so, do you just put it under fightype=dogshoot?

Re: I need help modding

PostPosted: Sun May 08, 2016 23:30
by Napiophelios
you will need to register an "arrow"

Use dungeon master as a referance:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- Dungeon Master by PilzAdam

stuff needed when you register_mob:
attack_type = "dogshoot",
reach = 3,
shoot_interval = 2.5,
arrow = "mobs:fireball",
shoot_offset = 1,

-- fireball (weapon)
mobs:register_arrow("mobs:fireball", {
   visual = "sprite",
   visual_size = {x = 1, y = 1},
   textures = {"mobs_fireball.png"},
   velocity = 6,

   -- direct hit, no fire... just plenty of pain
   hit_player = function(self, player)
      player:punch(self.object, 1.0, {
         full_punch_interval = 1.0,
         damage_groups = {fleshy = 8},
      }, nil)
   end,

   hit_mob = function(self, player)
      player:punch(self.object, 1.0, {
         full_punch_interval = 1.0,
         damage_groups = {fleshy = 8},
      }, nil)
   end,

   -- node hit, bursts into flame
   hit_node = function(self, pos, node)
      mobs:explosion(pos, 1, 1, 0)
   end
})

Re: I need help modding

PostPosted: Mon May 30, 2016 15:32
by TailsTheFoxDoes MT
Napiophelios wrote:you will need to register an "arrow"

Use dungeon master as a referance:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- Dungeon Master by PilzAdam

stuff needed when you register_mob:
attack_type = "dogshoot",
reach = 3,
shoot_interval = 2.5,
arrow = "mobs:fireball",
shoot_offset = 1,

-- fireball (weapon)
mobs:register_arrow("mobs:fireball", {
   visual = "sprite",
   visual_size = {x = 1, y = 1},
   textures = {"mobs_fireball.png"},
   velocity = 6,

   -- direct hit, no fire... just plenty of pain
   hit_player = function(self, player)
      player:punch(self.object, 1.0, {
         full_punch_interval = 1.0,
         damage_groups = {fleshy = 8},
      }, nil)
   end,

   hit_mob = function(self, player)
      player:punch(self.object, 1.0, {
         full_punch_interval = 1.0,
         damage_groups = {fleshy = 8},
      }, nil)
   end,

   -- node hit, bursts into flame
   hit_node = function(self, pos, node)
      mobs:explosion(pos, 1, 1, 0)
   end
})

Lots of code, but thanks, i'll use this for my new mod because Teletron shoots stuff. :\