AI and weapon thingy!

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

AI and weapon thingy!

Post by psYco »

Im just checking to see if an idea of mine is viable in RF.

I am planning om sending the player out into these desert proving grounds with just a numkulunkulu spear (a isiZulu throwing spear) you must fend off visious preditors, by throwing the spear and so killing the animal, however I want to make it so you have to go and pick up the spear each time, so when you throw it it sticks into the ground and you have to retrieve it, is this possible?

K now for the AI bit whitch is inter-related with the above, I want the preditors to circle you (their pery) for a few seconds before attacking (this gives you the chance to spear the first of two attackers and dive for the spear as the other charges you, you then grab the spear again, and hurl it at the second attacker) this would make for frantic and atmospheric ''battles'' (this is only a small part of the game but i think it would add nicely for the feeling of epic adventure im going for) as I also want the ''traveling'' music to fade and to be replaced by low and accellerating drumming when your preditors begin to circle you, and when you have killed them the music goes back...

I know this is gonna be complicated but im willing to work hard and i know a gifted scripter who Im sure will give advice (yes juutis you!) but for now i'll be content by wether or not its possible?

Thanks!
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Re: AI and weapon thingy!

Post by jonas »

psYco wrote:Im just checking to see if an idea of mine is viable in RF.

I am planning om sending the player out into these desert proving grounds with just a numkulunkulu spear (a isiZulu throwing spear) you must fend off visious preditors, by throwing the spear and so killing the animal, however I want to make it so you have to go and pick up the spear each time, so when you throw it it sticks into the ground and you have to retrieve it, is this possible?
I'm thinking you could use attach a pawn to the player. The really tricky part would be having the spear lay and wait to be picked up. But I think it is possible.

psYco wrote:K now for the AI bit whitch is inter-related with the above, I want the preditors to circle you (their pery) for a few seconds before attacking (this gives you the chance to spear the first of two attackers and dive for the spear as the other charges you, you then grab the spear again, and hurl it at the second attacker) this would make for frantic and atmospheric ''battles'' (this is only a small part of the game but i think it would add nicely for the feeling of epic adventure im going for) as I also want the ''traveling'' music to fade and to be replaced by low and accellerating drumming when your preditors begin to circle you, and when you have killed them the music goes back...
now do you mean that the enemies can grab your spear? That could be really tricky. But again I think it could be done.

If the spear was a pawn you could make a script that made the pawn attach to the hand bone of the player, and when you fire throw it, if it hits then set the damage attribute on the enemy pawn. Then wait for the player to come and press a key when the key is pressed then it reattaches.

Hope that helps and isn't too confusing.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Yeah, it can be done, as jonas said.
A while back I made a crossbow that worked like that. Every time it was fired, an arrow pawn moved in front of the player and started moving to the correct direction. Then if it hit an enemy it killed him instantly, and if it hit a wall it sticked to it. Oh, and the great part of it was that you could build "stairs" of arrows by shooting arrows near each other, every arrow a bit above the previous. Then you could climb up ....

Ah, but I got lost again. :D
Jonas explained it pretty well. Just attach a pawn to the player's hand and send it flying when it is fired.

That AI bit is a lot easier to do. It's just basic AI scripting, when a predator sees the player make him first just move sideways randomly, then after a few seconds attack.
Pain is only psychological.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

Cool thanks for the ideas!

@juutis : WOW!!! That idea with the crossbow sounds sooooooo cool! a weapon that creates geometry taht you can climb on... now thats an idea worth building on!

Oh and I had sumink similar in mind for the spear, I though id have the spear be a regular projectile that looses the gun when you ''fire'' it and then when it hits the animal or enemy it kills it etc, but then it creates an instance of an ammo pickup entity witch will be modeled like a spear sticking out of the ground! that way I can make i stick out at a nice 60degree angle, and then when you pick up the ammo pickup itll look like your picking up the spear out of the ground!

And the AI seems simple enough but will moving sideways really give the illusion that it is ''circleing'' the player? or can I adjust the angle??

Anyway ill cum bakc too all this closer to the time i get to this!

(i still need to learn sum basic scripting and blender! and i need to work out my ''possesion'' script!)

Thanks again! :)
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

And the AI seems simple enough but will moving sideways really give the illusion that it is ''circleing'' the player? or can I adjust the angle??
Of course you can adjust the angle. :D
You could even make the predators fly and perform suicide attacks if you wanted...
Hey! Couldn't you add some flying predators too? Like big birds! They would be a lot harder to hit with the spear.

Trust me, once you learn the basics of scripting you'll see how easy all these things are to do. :)
Pain is only psychological.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

WOW! thanks for teh idea! I love it! please anything like that (the big birds) is greatly appreitiated!

K, thanks this all sounds great! Im gonna make giant vultures! (well i suppose regular seize ones would be fine I think the South American Condor Eagle has a wing span of over 2 meters! Or mabey a huge African Vulture!

Any way thanks again for the idea! I think itll spice the gameplay up nicely!

But say you throught the spear up at a bird, would I be able to make it arc back to earth to stick into the ground? (well by stick inot the ground i mean make an ammo pick up when it hits the deck)

Thanks alot man! Im gonna start learning a bit of scripting tomoz! today is for blender and call of duty 2! :D
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

oooooooooooooooh! i just had an idea! what if there were also regular seized vultures that just followed and circled and followed you around like they are ''waiting'' for you to die!

Oh and when you kill the other more prditory animals they could swoop down to eat at the kill! That would just add another dimension to the detaiL!
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

But say you throught the spear up at a bird, would I be able to make it arc back to earth to stick into the ground? (well by stick inot the ground i mean make an ammo pick up when it hits the deck)
Well yeah, just apply gravity to it and it'll come down all by itself. :)

Those following vultures are great idea! They'll add a nice extra to the mood of the game.
Pain is only psychological.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

thanks! (it all sprung from your birds idea!) I think this short conversation prooves that although you can cum up with gr8 ideas its always best to bounce ideas off of others to get stuff thats truely inspired!
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

That arrow thing sounds cool, I'll have to keep that in mind for one of the projects I'm working on.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
Post Reply