Page 1 of 3

[WIP] The Glaive of Krull

Posted: Tue Dec 18, 2012 9:38 pm
by pferguso
Here is my Glaive of Krull mod for Legend of Grimrock! The glaive bounces off walls and returns to the hand of the thrower. It goes right through monsters and cuts them up, and then hits them again when it comes back! The Glaive can also trigger levers on walls, and can deflect off the shields of a special modified statue I did, which the player can rotate when they hit it with a melee weapon.

screenshot 1:
http://steamcommunity.com/sharedfiles/f ... =114192664

screenshot 2:
http://steamcommunity.com/sharedfiles/f ... =114192540

video:
https://www.youtube.com/watch?v=Kms9ASr81ZE

Re: [WIP] The Glaive of Krull

Posted: Tue Dec 18, 2012 9:49 pm
by Soaponarope
That is awesome!

Love the bouncing off the statues.

Re: [WIP] The Glaive of Krull

Posted: Tue Dec 18, 2012 10:04 pm
by Grimwold
indeed this is very impressive. I'd love to know how you scripted it, as I spent a lot of time scripting my returning axe that comes back after hitting monsters

Re: [WIP] The Glaive of Krull

Posted: Tue Dec 18, 2012 10:22 pm
by Batty
This is very cool & well done, I'm interested in the script as well.

My favorite 80s sandal flick was The Sword and the Sorcerer, mean & dirty! I remember seeing Krull but don't remember if I liked it or not.

I know this is game world but IMHO shifting 5 ton statues with a single sword blow is too much of a stretch for me.

Re: [WIP] The Glaive of Krull

Posted: Tue Dec 18, 2012 10:26 pm
by Billick
That is really cool. Nice work! I don't remember seeing the Krull movie, but I'm pretty sure I remember playing a Krull arcade game.

Re: [WIP] The Glaive of Krull

Posted: Tue Dec 18, 2012 10:53 pm
by germanny
Now this is great, very good job!

I´ve watched the movie krull in the 80s too, and revieved him last year.
Then, I found it great, but now rather mediocre to good. But this for my age, i guess^^. Things changed.

Are you willing to share your script?

Re: [WIP] The Glaive of Krull

Posted: Tue Dec 18, 2012 11:03 pm
by pferguso
Grimwold wrote:indeed this is very impressive. I'd love to know how you scripted it, as I spent a lot of time scripting my returning axe that comes back after hitting monsters
I will share the script after I release my dungeon, but I can speak in psudo code here:

When the glaive is thrown, it uses a shootProjectile function. the glaive direction determines the offset of this launch in relation to the player, so that it starts off a bit to the left, and returns in the center. Also, it is set as "fragile" and this has a big part in figuring out where it is at any time.

After launch, a timer function starts, and searches for the glaive. When it finds it, it records its location, and current direction. If it can't find it, then I know that the glaive as collided with either a monster, some blockage, or a wall.

When this happens, I go through a function that determines if it should come back in the opposite direction that it was flying when it disappeared (hit wall), or if it should continue going in the current direction (hit monster) or if it should turn (hit a deflector)

After determining the type and manner of collision, the script will spawn a new projectile of the glaive in the direction and location in which it was previously lost track of.

As for making it not hurt the party, this involves having a onProjectileHit hook on the party script, which prevents the glaive from harming the party when it comes back, and thus triggering the "catch" part of the script. In order to prevent the player from catching the glaive instantly upon throwing it, I make the projectile Glaive ignore the party when it is first thrown.

I hope that helps, and like I said, I'll share the complete source, but I have too many goodies that are going into my Dungeon that I'd like to release that first, then the source for all my weapons and traps I will release then.

Re: [WIP] The Glaive of Krull

Posted: Tue Dec 18, 2012 11:21 pm
by Skuggasveinn
The video is awesome, really nice work.
Now I have to dig up that movie :D

Skuggasveinn.

Re: [WIP] The Glaive of Krull

Posted: Wed Dec 19, 2012 12:19 am
by LordYig
Very nice and impressive !
I haven't seen the Krull movie but i guess I'll have some time to find and watch it before you release you dungeon.

Re: [WIP] The Glaive of Krull

Posted: Wed Dec 19, 2012 12:43 am
by Rook
That is seriously impressive!

Looking forward to getting my hands on it.