Free

Our Site Admins are: Silent_x_L3gend, UberOrbPS and Zeusintraining
©️ Copyright Littlebigpod 2011
Latest topics
» Our new moderator
Fri Oct 07, 2011 4:24 am by Silent_x_L3gend

» I AM PUNCHING YOUR SALAD!!
Thu Sep 22, 2011 6:05 am by Silent_x_L3gend

» Sticker Panel Animation (The easiest way)
Tue Sep 20, 2011 8:01 am by butaneflame

» New here! :)
Mon Sep 12, 2011 6:58 am by Silent_x_L3gend

» Hide n Seek
Sun Sep 11, 2011 11:51 pm by Silent_x_L3gend

» Speed Sensor -quick speed trap tutorial example
Sun Sep 11, 2011 2:45 pm by butaneflame

» LittleBigPod Picks (Official Site Level Showcase)
Tue Sep 06, 2011 8:47 am by butaneflame

» Pod Picks 3
Mon Sep 05, 2011 8:59 am by Silent_x_L3gend

» Site Feedback
Mon Aug 29, 2011 9:00 am by butaneflame

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Search
 
 

Display results as :
 


Rechercher Advanced Search


You are not connected. Please login or register

How to bring your Sackbot to Life!

View previous topic View next topic Go down  Message [Page 1 of 1]

1default How to bring your Sackbot to Life! on Thu Jul 14, 2011 2:44 pm

butaneflame

avatar
Tutorialist
Tutorialist
Bringing your Sackbot to Life!

Here's a few useful things you might want to add to your bots to make them feel less like scenery and more like sentient helpers in your level.



Impact Sensor -> Sackbot soundclip : Grunt

This will make your sackbot grunt every time he lands on the ground, hits something, etc.



Projectile Sensor -> Sackbot soundclip : Disgusted

This is a nice addition for when you have the creatinator in your level, if you accidently shoot your friendly sackbot he'll shake his head and grumble at you!



Player Sensor (very close proximity) -> Sackbot soundclip : Greeting + AI action (wave motion)

This will make your sackbot stop following you and wave a short greeting when he gets up to you.



Colored tag Switch (medium proximity) -> Sackbot soundclip : query. Also set AI to look at waypoints of the same color

This will make your sackbot look at the switch and go "heh?" when he sees it. Stick these colored tags on any object of interest in your levels, switches, enemies, etc. It's a good way also to help guide the player subtly in your levels.



Grab Sensor -> Sackbot Soundclip : query.

Same idea as the previous tip, this one makes your sackbot make a confused sound when the player grabs onto him and tugs him around.



The list goes on, but these little tweaks are excellent ways to really make your sackbots stick out in your levels.



Here's how to set up interactions amongst different sackbots, for example lets say you want to make 2 different types of sackbots, friendly and enemies, the enemies flee from you, the friendlies follow you, and the enemies and friendlys attack each other. It's much easier than you think.



First make your two sackbots, and set them a bit of a ways away from each other. Customize them to run like sack people, and give the friendly, lets call him Jack, a bit of a grin. Next make them both afraid of heights and danger, but able to jump and change planes. Finally dress them up to look the parts.



Next, open up Jacks MC and stick a green key in there. This will now make all of Jack associated as a green tag. Do the same for the Enemy but give him a red tag.



Let's start with Jacks AI. Let's look at all possible inputs. A: Nothing, no one is around. Let's make him idle while this is happening. Next you are nearby, so he follows you. Third, an enemy is close by, so he charges in and attacks. And fourth, BOTH you and an enemy are nearby, so who takes precedence? Let's give it to the enemy.



Ok so all we need is a 3 way selector switch, 3 inputs and outputs. Smack that in the middle. Here are your inputs:



#1 Battery

#2 Sackperson Proximity Switch

#3 Red Tag Sensor Switch



As for outputs, set all three to hook up to 3 different sackbot AI chips.



#1: Make him stand idle, looking around. Hook him up to look at, say, purple tags. These will be objects of interest in your level (moving doors, moving objects, sounds, etc) this adds a more realistic feel to your sackperson so he glances around at his surroundings.



#2 Basically same set up but instead of idle he is now set to follow your sackperson. However set his awareness to be about twice that of the distance of the trigger for the proximity switch. Why? You'll need to get up close if you lose track of him, but once he's following you you can go farther away and he won't get lost.



#3 Set this one to follow tagged waypoint, red, as well as aggressive. Second, set his facial expression to angry. Third, set him to look at tags, red, so he's not only angry, but angry and looking at the enemy he's angry at.



Viola, your sackperson should now chill out til you land, to which he follow you pleasantly, but then abruptly takes off and glares angrily at the enemy if you get too close.





Next: The enemy AI. This one is way trickier because we want the enemy to do a lot more stuff.



First, when he is idle lets set him to patrol, BUT we want to control our enemy's patrol path, so when he reaches a colored tag he turns around and goes the oppisite direction, this is easy, just set it to toggle between left or right walking.



Second, we want him to not continuously walk, we want him to pause for 3-4 seconds and look around when he reaches another type of colored tag. This will require timers, resets, and a bunch of other complicated stuff.



Third, we want him to attack the friendly NPC upon spotting him.



And fourth, we want him to run away while attacking the player if he spots the player, taking precedence over killing the NPC.



Whew, thats kind of complicated, but lets see what we can do. First, we need pretty much the same set up for the friendly, but 5 inputs. These are:



#1 Battery

#2 Blue Tag Switch (NPC sighted!)

#3 Player Proximity (Run away!)



Ok already its looking a bit tricky but lets start with the easy stuff. First hook up the #2 and #3 outputs to their respective AIs directly, #2 being the same as the friendly's aggression towards enemy AI accept towards a blue tag instead of red.



Second #3 will be set to flee, aggressive. Maybe add a scared face for extra measure.



Ok, so now to set his patrol path. First we'll build the necessary AIs on the right, both patrolling at about 70% speed, walking, one left handed and one right handed.



So what we need to do is hook up to and switches, one to each of those AIs. Have their top inputs be the #1 output from your first selector switch. Next hook up a toggler, and have its input be a orange or whatever tag switch, these will swap the path of the bot. Set its output to both #2s of the and switches.



Now whenever no one is around, the sackbot will strut left or right until he hits an orange tag, to which he'll promptly turn around and walk the other way. Now we can directly control the sackbots patrol!



Now to make him pause at purple tags, this is tricky. First add a purple tag detector to this conglomeration of AI, near the pathing section of your AI.



Break both of the connections between the AND->AI connections, and stick a 2IO selector in each one. Remake the connections, but going through the #1 input and outputs of the respective selectors. If you exit out, the sackbot still works exactly the same, but now we've added the ability to temporarily break the connection to the pathing AIs.



Build your last AI MC, set this to having the sackbot idle, looking around, and looking at purple tags. Maybe make him frown harder or something.



Next, hook up BOTH #2 outputs of the selectors to this last AI.



Now remember that purple tag switch we made earlier? We'll want to hook that up to a timer, maybe 4 seconds long. Next we'll hook that timer up to both #2 inputs of the selectors.



Set the output of the timer to be opposite, so it turns off when full (NPC is done looking around). But now we have a problem! Because its perma on, the NPC just stands there like a stone, so we need to also verify that he is near a purple switch, but not done looking at it.



Break the connection between the timer and the selector, and put an AND switch between them, so now its (not)Timer -> AND -> Selector I2



Next hook up the other input of that AND switch to be the purple tag switch we made awhile ago. There, now he only stands still when hes at a purple tag AND his timer isn't full.



But now when he keeps walking, if he hits a new purple tag his timer is already filled up! We need a way to reset it to 0! Ok that's actually really easy, and it's the last step.



Make a NOT gate, and feed the purple tag switch into it. Feed it's output into the reset input of the timer on the bottom.



Viola, once the sackbot walks away from the purple gate it resets the timer.



Try building a path for him to walk and patrol along to see it in action. Then copy him and the friendly npc, give them both creatinators and watch them attack each other!





Obviously this isn't my video its from Comphermc who posted it on youtube. He hangs out on LBC.com. Thought this video might help others. Lot of neat tricks he uses in the tutorial. Its just over 15 mins long. Well worth the time to watch it though

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum