Page 1 of 3

arena type game

Posted: Sun Feb 04, 2007 2:43 am
by darksmaster923
can rf make an arena type games, like respawns for player and bots in a level shooting at each other ramdomly

Posted: Sun Feb 04, 2007 3:38 am
by scott
yep

Posted: Sun Feb 04, 2007 4:49 am
by darksmaster923
WOOO!!!!!!!!!!!!!!!!!!!!!!!!how

Posted: Sun Feb 04, 2007 5:12 am
by scott
im thinking you mean a bit like unreal tornament where you got a small arena and you got other players and yourself.
for this you would create your level, then create the player and enimies, then import them to RF and set the teams to be different this is done in the .ini files and scripting, there was a topic on the forum for setting teams, i havnt personaly done this but i am almost posotive it can be done.

Posted: Sun Feb 04, 2007 2:13 pm
by QuestOfDreams
If you mean multiplayer type games, then no, they can't be done with RF yet.

Posted: Sun Feb 04, 2007 2:53 pm
by psYco
althoug there is no multiplayer ability as such, you still can make arena games that would have bots and then there should be a way that you could get scores to be uploaded to an online server, so you can compete for scores with other people? Im not sure if this is possible but its just an idea of a way to include an aspect of competition.

Posted: Sun Feb 04, 2007 4:44 pm
by darksmaster923
wat about the respawning for player and bots

Posted: Sun Feb 04, 2007 4:46 pm
by Juutis
Yes, respawn can be done.

Posted: Sun Feb 04, 2007 11:33 pm
by darksmaster923
how

Posted: Tue Feb 13, 2007 4:54 pm
by incenseman2003
I have done a search for this and cannot find any details in the FAQ, Manual or the forum and there is no setting in the pawn entity for it. I also would like to know how this is done.

Posted: Tue Feb 13, 2007 5:09 pm
by Juutis
It's possible to make the enemy pawns teleport to a certain location and make their health go to full when they die. You could also write a script that checks if the player health is 0 and if so, give him full HP and teleport him to a spawn.

Posted: Tue Feb 13, 2007 6:21 pm
by incenseman2003
Do you know how to make the pawn teleport to a different place regain health and teleport back? If so could you give all the details on how to do it?.

It doesnt sound like something that I would be able to figure out on my own.

Posted: Tue Feb 13, 2007 7:13 pm
by Juutis
This all has to be done with pawn scripts.

First you need to have a AI script for a pawn.
Let's assume that the first order in the script is called 'Spawn' and the last one is 'Death' ( = when the pawn has played its death animation).

You would then add something like this to the 'Death' order:

Code: Select all

TeleportEntity(self.EntityName,"spawn_point");
SetAttribute("health",100);
HighLevel("Spawn");
The TeleportEntity() command makes the pawn teleport to a scriptpoint called "spawn_point". You would place the scriptpoint where ever you want the pawns to spawn.
Let's also assume that the pawn has a health attribute called "health" and it has a maximum of 100hp. SetAttribute() gives the pawn full health.
And after that the pawn 'resets' with the HighLevel() command, meaning that it goes back to the first order. You could also make it go straight to a, say, attacking order or something. As long as it jumps to an order in which the pawn is 'alive'.

I hope I made sense. :)

Posted: Tue Feb 13, 2007 9:11 pm
by incenseman2003
I have the death section of my robot entered as below:

Death[()
{
DelTimerOrder(1); // remove alert timer
AddPainOrder("PainToAlert", 0); // remove pain order
FindTargetOrder(0, "FoundTarget", DAMAGEATTRIBUTE); // remove target finding
DelTriggerOrder("IdleToAlert"); // remove alert trigger
SetNoCollision(); // remove bounding box so there are no collisions with corpse
AnimateStop(DIE, DIEHOLD, "");
FadeOut(DIEFADE, 0); // fade out corpse
Remove(true); // remove actor
TeleportEntity(self.EntityName, spawn_point);
SetAttribute("enemy_health",100);
HighLevel("Spawn");


I have a script point set up as follows:

Angle = 0 0 0
NextOrder =
NextPoint =
origin -208 -224 -120
szEntityName = spawn_point




I have a robot for a pawn and it is set as below:

Angle = 0 0 0
Changrmaterial =
ConvOrder =
ConvScriptName =
HideFromRadar = False
origin = 76 -224 -94
PawnType = robot
ScriptName = robot.s
SpawnOrder = Spawn
SpawnPoint =
SpawnTrigger=
szEntityName= robot



When I kill the robot it just fades out and does not respawn.

Was there something I missed?

Posted: Tue Feb 13, 2007 9:42 pm
by Jay
incenseman2003 wrote: Remove(true); // remove actor
You remove the pawn and because of that it cannot respawn.