Making Spiders Shoot! (Solved)
Making Spiders Shoot! (Solved)
Hey new here! Been working on a few maps lately and have been making some great progress but I seem to be stuck on something silly.
I need my custom "spider" to shoot "poison_bolts" and act as a ranged unit. I have tried all the obvious stuff to no avail, he tries to attack at range but doesn't fire projectiles. So it seems I'm having trouble getting monsters that are melee to use projectile attacks. Thanks in advance!
(Edited the title so its easier for others to find this)
I need my custom "spider" to shoot "poison_bolts" and act as a ranged unit. I have tried all the obvious stuff to no avail, he tries to attack at range but doesn't fire projectiles. So it seems I'm having trouble getting monsters that are melee to use projectile attacks. Thanks in advance!
(Edited the title so its easier for others to find this)
Last edited by Mal85 on Thu Nov 22, 2012 2:09 pm, edited 1 time in total.
My slow going projects...
viewtopic.php?f=14&t=4538&p=59753#p59753
viewtopic.php?f=14&t=4538&p=59753#p59753
Re: Hi, stuck on Monster Script!
That's odd... It certainly doesn't take ranged attacks very well. I'm investigating this, but to be frank I have no idea why either... It might have something to do with the animation events, but that is no more than a hunch.
EDIT: Woah, I think I just tried to make a spider walk sideways and it crashed the editor. Note to self: be wary with the Skeleton Archer Brain. : P
EDIT2: Okay, the spider has two animation events, spider_bite and spider_bite_jump. Why? I see no other reference to the spider_bite_jump animation anywhere. I'm not a master of animation events, though, so I don't know if this is relevant. Another observation is that the spider still does it's melee damage if I stand next to it, curious.
EDIT3: Ooohhh, this is getting more interesting by the moment... I switched the spider's attack animation to spider_bite_jump, and now it can jump one square forward as it attacks... It seems very buggy, though, the movement is not exactly fluid. Still no nearer to the answer to the original question, though.
EDIT: I concede defeat -- no idea why it doesn't work. : / But shooting spiders would be cool, so I hope someone has an idea how to implement them.
EDIT: Woah, I think I just tried to make a spider walk sideways and it crashed the editor. Note to self: be wary with the Skeleton Archer Brain. : P
EDIT2: Okay, the spider has two animation events, spider_bite and spider_bite_jump. Why? I see no other reference to the spider_bite_jump animation anywhere. I'm not a master of animation events, though, so I don't know if this is relevant. Another observation is that the spider still does it's melee damage if I stand next to it, curious.
EDIT3: Ooohhh, this is getting more interesting by the moment... I switched the spider's attack animation to spider_bite_jump, and now it can jump one square forward as it attacks... It seems very buggy, though, the movement is not exactly fluid. Still no nearer to the answer to the original question, though.
EDIT: I concede defeat -- no idea why it doesn't work. : / But shooting spiders would be cool, so I hope someone has an idea how to implement them.
Last edited by Kuningas on Thu Nov 22, 2012 12:57 pm, edited 1 time in total.
BASILEUS
Re: Hi, stuck on Monster Script!
Vexing isnt it? Those are the same problems I ran into. I thought perhaps it was an animation problem as well. But that's about as far as I got.
EDIT: Perhaps using CloneObject instead of making a new monster may be causing problems? I'm going to try and change the graphics and models for a cloned archer to a spider and see what happens.
EDIT: Perhaps using CloneObject instead of making a new monster may be causing problems? I'm going to try and change the graphics and models for a cloned archer to a spider and see what happens.
My slow going projects...
viewtopic.php?f=14&t=4538&p=59753#p59753
viewtopic.php?f=14&t=4538&p=59753#p59753
Re: Hi, stuck on Monster Script!
I'm pretty sure it is to do with the animation events. If you've downloaded the official asset pack (Which is just for reference and isn't actually required by the game/editor) and take a look in: assets\scripts\animation_events.lua
You will see that the spider has two "attack" events defined (though I don't think the spider_bite_jump animation is used).
Whereas the Uggardian has a "ranged_attack" event defined.
SO.. I expect you will need to define a new animation event for your ranged spider and link it to the animation file you use for the ranged attack... in fact you may want to copy the animation from the asset pack into your mod folder, instead of using the original spider one. then there's no risk of the basic spider trying to make ranged attacks too
You will see that the spider has two "attack" events defined (though I don't think the spider_bite_jump animation is used).
Whereas the Uggardian has a "ranged_attack" event defined.
SpoilerShow
Code: Select all
-------------------------------------------------------
-- Spider
-------------------------------------------------------
defineAnimationEvent{
animation = "assets/animations/monsters/spider/spider_bite.fbx",
event = "attack",
frame = 11,
}
defineAnimationEvent{
animation = "assets/animations/monsters/spider/spider_bite_jump.fbx",
event = "attack",
frame = 12,
}
Code: Select all
-------------------------------------------------------
-- Uggardian
-------------------------------------------------------
defineAnimationEvent{
animation = "assets/animations/monsters/uggardian/uggardian_attack.fbx",
event = "ranged_attack",
frame = 9,
}
Last edited by Grimwold on Thu Nov 22, 2012 1:24 pm, edited 1 time in total.
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: Hi, stuck on Monster Script!
shooting spiders sound extremely unpleasant, yikes!
Finished Dungeons - complete mods to play
- Soaponarope
- Posts: 180
- Joined: Thu Oct 04, 2012 3:21 am
Re: Hi, stuck on Monster Script!
Beat me to it Grimwold, I was just playing with custom monsters and making this very thing happen. Let the newbie have his moment and have the answer for once
Re: Hi, stuck on Monster Script!
I just got it to work!
Code available if anyone wants.. but happy to let others have at it...
Code available if anyone wants.. but happy to let others have at it...
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: Hi, stuck on Monster Script!
Phew, this seems like its going be a bit more work than I had expected. I guess I have a night full of experimentation ahead of me.
@grimwold Hmm, I think I get what your saying, I'll give that a try. Thanks!
@komag That was exactly the reaction I was going for
@grimwold Hmm, I think I get what your saying, I'll give that a try. Thanks!
@komag That was exactly the reaction I was going for
My slow going projects...
viewtopic.php?f=14&t=4538&p=59753#p59753
viewtopic.php?f=14&t=4538&p=59753#p59753
Re: Hi, stuck on Monster Script!
That's why Grimwold is the master around here, let us students watch and learn!
Finished Dungeons - complete mods to play
Re: Hi, stuck on Monster Script!
Almost Human were planning leaping spiders? That would be dangerous!
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!