Announcement

Collapse
No announcement yet.

Sliding Monsters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    No path nodes?!??!?! No **** the monsters don't know what to do.

    Leave a comment:


  • replied
    Hmm, right now I don't have any pathing in my maps. I just placed the monsters randomly around to playtest so maybe it keeps running into walls since theres no path for it to follow?

    Leave a comment:


  • replied
    I believe the byte in WhatToDoNext(#) is just for logging purposes.
    Each method has a different value it passes in so when it Logs an error it can say who called it.
    It should be optional since it really isn't used except for debugging, and then it should be a string so it is understandable. So I wouldn't worry about it.

    And don't worry if you don't get the AI coding this stuff right away. The AI scripts are difficult and not documented.


    The WhatToDoNext() code in Bot.uc is:

    Code:
    function WhatToDoNext(byte CallingByte)
    {
    	//if ( ChoosingAttackLevel > 0 )
    	//	log("CHOOSEATTACKAGAIN in state "$GetStateName()$" enemy "$GetEnemyName()$" old enemy "$GetOldEnemyName()$" CALLING BYTE "$CallingByte);
    
    	if ( ChooseAttackTime == Level.TimeSeconds )
    	{
    		ChooseAttackCounter++;
    		if ( ChooseAttackCounter > 3 )
    			log("CHOOSEATTACKSERIAL in state "$GetStateName()$" enemy "$GetEnemyName()$" old enemy "$GetOldEnemyName()$" CALLING BYTE "$CallingByte);
    	}
    	else
    	{
    		ChooseAttackTime = Level.TimeSeconds;
    		ChooseAttackCounter = 0;
    	}
    	OldEnemy = Enemy;
    	ChoosingAttackLevel++;
    	ExecuteWhatToDoNext();
    	ChoosingAttackLevel--;
    	RetaskTime = 0;
    }
    So you can see there that the byte is just uesd for logging.

    Leave a comment:


  • replied
    I've seen the WhatToDoNext() everywhere in my monster class (I used the monster class from Skaarjpack) but I haven't seen any tutorials anywhere that explains it. Often I'll see a WhatToDoNext(99) for example, but don't know what the actual number does. Is the number some sort of a delay, as in whenever it finishes attacking, it'll do nothing for the duration of 99? (I'm sorry, Im just a total idiot when it comes to coding, please forgive my noobness )

    Leave a comment:


  • replied
    It sounds like they don't quite know what to do, and when they hit a wall, it sends a message to them that they need something else to do. This is often called "What to do next" in the AI controller classes.

    Look for methods called ExecuteWhatToDoNext() or WhatToDoNext().


    Take a look at the skaarj classes in SkaarjPack, particularly Monster.uc

    Leave a comment:


  • started a topic Sliding Monsters

    Sliding Monsters

    My monsters walk around fine, but sometimes they'll simply head straight for a wall and will not turn and chase me UNTIL they hit a wall. While they are on they're path to a wall, no walk/run animation plays, making them look like theyre sliding all over the place. I've just about had enough and my head is going to explode. Can any coders shed some light on this? I'm really having a bad time. (I'll post the code if you want to take a look at it)
Working...
X