arena type game

Game Design, Story, Game Play.
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

Jay wrote:
incenseman2003 wrote: Remove(true); // remove actor
You remove the pawn and because of that it cannot respawn.


I set "Remove(true);" remove actor to "Remove(false);" and when the pawn died it faded out and the game crashed.
I just commented "Remove(true);" out and and when the pawn died it faded out and did not spawn in.
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

There is a reason why there is a documentation for the scripting commands
Remove(bool State)
Delete the Pawn's actor from the level. If State is false then the script will continue to run. Otherwise the script ends and the Pawn is inoperable. When the script is running after the Pawn is removed none of the actions that require an actor will work.
Also if you fade out the pawn you have to make it visible again when respawning. It's quite possible that it respawns but you just can't see it.
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

I now have the death section of the robot.s set up as follows:

Death
// 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(false); // remove actor
TeleportEntity(self.EntityName, spawn_point);
SetAttribute("enemy_health",100);
HighLevel("Spawn");

When I kill the robot it dies and then respawns but is indestructable after respawning. If I run the game again the robot doesnt even respawn after I kill it. If I run the gam again it spawns in after I kill but dies the instant that it respawns. It seems very random. Thoes are the the things that happen the most.

QuestOfDreams wrote:There is a reason why there is a documentation for the scripting commands
Remove(bool State)
Delete the Pawn's actor from the level. If State is false then the script will continue to run. Otherwise the script ends and the Pawn is inoperable. When the script is running after the Pawn is removed none of the actions that require an actor will work.
Also if you fade out the pawn you have to make it visible again when respawning. It's quite possible that it respawns but you just can't see it.
It seems that you have a nack for saying things in just the right way. But it can rub people the wrong way.

In stead of saying "There is a reason why there is a documentation for the scripting commands". You could have just pasted the info from the manual and told where it can be found and called it good. It seems as though you had to make it boarder line harsh. I dont understand why.


I have read the manual very well and the FAQ. I have figured out alot of things on my ownt that I have not mentioned on the forums. I dont ask a question on the forum as a first step. Only after I have no other option do I come to the forum. If your of high IQ then three cheers for you. Not everyone is. You seem to be irritated at the fact that people dont learn as fast as you do. If your a fast learner then you have a gift. If other people ask a question that you see as less than valid why say anything to make them feel little. Thier questions dont hurt anyone. Sometimes even the most inteligent people ask the simplest questions. I have trouble shot billion dollar computer networks from coast to coast. I have been helping people with thier web design issues for many years. I am well read in the religious texts of many cultures. I have studied the martial arts since the age of five. I have a wealth of knowledge on many subjects. there is a lot of things that seem like common sence to me that other people dont understand. When someone asks me a question I just answer it cheerfully and just feel good that I may have given them something they can use. What Im trying to say is that you dont seem happy supporting RF. Alot of the time questions seem to annoy you. I am sorry if you are not happy doing what you do. I have been brought to understand that you do this with no pay. That must mean that you see something in it that can do some good. If that is the case then carry on. But, if you are not happy with it then why do it?

Why not answer a question with grace. If the answer is in the manual or the FAQ then copy and past it as a reply. I never feel silly for asking questions. I will probably ask a billion more before I die.

I just ask that you try not to make people that might be heavy contributers to the RF project leave and not come back because of something you said.

Im not the slightest bit upset, but I am concerned for the wellfare of RF and its community. I havent been here as long as some but that doesnt mean that I dont feel some passion for the project as a whole. Sarcasm will hurt it, not help it.

I respect your knowledge and I make it a habit not to claim or feel superiority over anyone in anything. Im just afraid that the project could loose good people from harsh words.

Please dont be upset. I only have the best interests of RF in mind.
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

what about player respawn
Herp derp.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

I think that you have to change the player's health attribute first, because using 'health' would lead to the player death actions when it reaches 0.
So add an attribute called 'playerhealth' or something and use that as the damage attribute with your enemy pawns.

Then add a pawn with script:

Code: Select all

{

    Spawn[ ()
    {
        LowLevel("setup");
    } ]

    setup[ ()
    {
        PawnRender(false);
        self.think = "check";
    } ]

    check[ ()
    {
        self.ThinkTime = 0.5;

        if(GetAttribute("playerhealth","Player") < 1)
        {
            SetAttribute("playerhealth", 100,"Player");
            TeleportEntity("Player","spawn_point");
        }

    } ]

}
When I kill the robot it dies and then respawns but is indestructable after respawning. If I run the game again the robot doesnt even respawn after I kill it. If I run the gam again it spawns in after I kill but dies the instant that it respawns. It seems very random. Thoes are the the things that happen the most.
Your death order seems to be high level. I assumed it would be lowlevel and that's why there is 'HighLevel("Spawn");'. You have to change it to 'NewOrder("Spawn");'
Pain is only psychological.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

thanks juutis

incenseman is it everything commented on the real script

edit: juutis the script doesnt seem to work. these are everything i did: added a pawn and gave it scriptname player.s which has that code and nothing happens
Herp derp.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

juutis the script doesnt seem to work. these are everything i did: added a pawn and gave it scriptname player.s which has that code and nothing happens
You have to add a scriptpoint called "spawn_point" in the level and change the player's health attribute.
You see, once the attribute called 'health' reaches 0, RF thinks that the main character is dead and after that there's no way to bring him back to life. So you have to fake his death. Add an attribute called 'playerhealth' and modify your enemy scripts so that they damage the new health attribute. Then the script should work, but the bad side is that all those things that are done when the player dies aren't done if you fake it. For example, death animation isn't played.
Pain is only psychological.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

can u do like, play(die) then wait 2 seconds then complete script
Herp derp.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Well, I tried it with this script:

Code: Select all

{
timer	[0]

    Spawn[ ()
    {
        LowLevel("setup");
    } ]

    setup[ ()
    {
        PawnRender(false);
        self.think = "check";
    } ]

    check[ ()
    {
        self.ThinkTime = 0.5;

        if(GetAttribute("playerhealth","Player") < 1)
        {
                MouseControlledPlayer(false);
                SetKeyPause(true);
                AnimateEntity("Die","Player",true);
                timer = self.time + 2;
                self.think = "wait";
        }

    } ]

    wait[ ()
    {
        self.ThinkTime = 0.5;

        if(timer < self.time)
        {
                MouseControlledPlayer(true);
                SetKeyPause(false);
                SetAttribute("playerhealth", 100,"Player");
                TeleportEntity("Player","spawn_point");
                self.think = "check";
        }

    } ]

}
But I can't seem to get the player to play the animation...
Pain is only psychological.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

nm got it to work its case senitive

now for work with respawn pawns
Herp derp.
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

I am officially totally confused.

Is there a cut and dry way to make a non-player pawn respawn after I kill it?

Im having a difficult time putting all the bits and pieces together.

I just need something definitive.

K?

Sorry, im kinda slow.

I will be getting out a little tomorrow if my friend can come and help me. Maybe the fresh air will help. LOL!!!
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

hey, i dont get it either
Herp derp.
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

Juutis,

Did you actually get the pawn to respawn?
Did the pawn respawn at the script point?
Were you able to kill it again?
I can get the death animation to play just fine.
The only thing that I cant get to happen is the pawn respawn every time and have it killable again. It only respawns sometimes and when it does it is indestructable.

The information is getting quite fragmented here.

Can you please put in a nutshell?

Thanks.
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

I haven't actually even tried to get it to work.

Could you post the script?
Maybe I can take a look when I find some time...

And yeah, I remember, I'm supposed to look at the other script of yours too. :)
Right now I'm kinda busy with school and stuff, though.

Oh, and make the script an attachment, please. I really hate to copy/paste a script from the forums, because they get all messed up.
Pain is only psychological.
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

Here is the script Im using.
Attachments
robot.rar
(3.52 KiB) Downloaded 70 times
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
Post Reply