PDA

View Full Version : Kismet : Ball Goal Scoring.



InZaneFlea
03-03-2009, 04:28 PM
Hey there. I'm working on a project right now, using Kismet and UnrealScript. I have a ball that I've brought in as a KActor, which I'm pushing around with a modified Impact hammer that does no damage but pushes the ball around. I have it set up right now so the ball itself triggers when it hits the 'goal', and the text 'Goal!' is displayed so I know it's triggering.

My question, is how do I add 1 to the score of the other team when the ball goes in the goal? Is this possible in Kismet? If not, I have no idea what I'd have to do in UnrealScript, so would anyone be able to help me with that? As it is, I've spent about 6 hours fooling around in Kismet to no avail, and this is my current Kismet setup :
http://img.photobucket.com/albums/v495/inzaneflea/Kismet.jpg

Top left is simply setting up player inventories on spawn.

Rest of it is the trigger, and me playing around with trying to get the goal scoring working, but I really have no idea where to begin.

I've thought maybe I need to use a Named Variable that is set to whatever the variable is that controls the score for each team, but I can't find that variable. Help me!

InZaneFlea
03-03-2009, 05:29 PM
Would it be possible to create a Sequence Action of a Flag being Captured? I could make that work easily, if that's the case. Simply when the ball hits the trigger, destroy the ball, run the SeqAct of the Flag being Captured, then find a way to respawn the ball and respawn the players back to their starting points. Is that possible?

InZaneFlea
03-04-2009, 11:25 AM
Anyone have any ideas?

InZaneFlea
03-05-2009, 05:26 PM
Still can't figure this out. Anyone have any ideas at all?

InZaneFlea
03-07-2009, 12:17 PM
Lalalala, BUMP!

Is there anyone helpful out there at all or am I completely on my own here? I'd rather not fail my class you know.

spermplant
03-07-2009, 07:23 PM
Look over the source code. Why doesn't your teacher teach you? - seems to defeat the purpose of a class.

InZaneFlea
03-07-2009, 08:15 PM
That's a good question, isn't it? He has no clue. Neither do I.

And I've spent hours looking over the src code, and I'm at a loss as of where to go next, hence why I posted here. He actually told me to post on some forums and see what I could find.

spermplant
03-08-2009, 11:13 AM
If there are no constraints to your assignment, then why not just use Reliquary's Bombing Run (gametype) and replace the ball mesh with your mesh? Oh yeah, I forgot how the players pick it up... However their code is a good place to look; you can see how they used the Flag and the warfare orb.

InZaneFlea
03-08-2009, 03:50 PM
Okay. So I found from BR's code, that it's adding points with a "ScorerPRI.Team.Score" variable. Is there anyway I can call that from Kismet? If I can do that, then everything will work out fine, I've got the rest figured out.

Here, I'll write out what I want to have happen.

if NBBBall collides with NBBGoal;
{
ScorerPRI.Team.Score +=1;
Resetball;
Respawnplayers;
}

Tada, that's it. Why is that so hard in Unreal and Kismet?