playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
[SOLVED] - Just Starting - NPC Look Up and Down at Random Intervals
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [SOLVED] - Just Starting - NPC Look Up and Down at Random Intervals (Read 1385 times)
Shotts
Playmaker Newbie
Posts: 5
[SOLVED] - Just Starting - NPC Look Up and Down at Random Intervals
«
on:
March 03, 2020, 10:34:07 AM »
Hi Everyone,
I'm starting out with Playmaker and I'm trying to create a classroom scene populated with NPC's who switch their head gaze between the instructor and their electronic devices at random intervals. So far, I've managed to have them shift very quickly away from the default animation pose and look up but they switch back to the default pose rather than look at their device. I also mangled the FSM so that it now exceeds the max loop counts.
I've attached a screenshot of the FSM so far. Any insight, particularly into the prerequisites for switching between states, would be enormously appreciated as I clearly still haven't gotten my head around how FSM's function (in spite of watching multiple intro videos).
I will try the following tonight when I'm back home to clear out the max loop issue but I suspect addressing this won't improve the situation.
https://hutonggames.com/playmakerforum/index.php?topic=6511.msg31791#msg31791
«
Last Edit: March 04, 2020, 09:25:46 AM by Shotts
»
Logged
djaydino
Administrator
Hero Member
Posts: 7616
Re: Just Starting - NPC Look Up and Down at Random Intervals
«
Reply #1 on:
March 03, 2020, 12:03:23 PM »
Hi.
You do not need the send event there.
on the "Random Wait" action on the 'Finish Event' set 'GazeUp' there.
as now its not doing the wait as the send event will send the event immediately.
I would suggest to look first to some basic tutorials to get familiar with Playmaker
you can find some links to tutorials here :
https://hutonggames.com/tutorials-game-design-with-playmaker.php
Logged
Join the PlayMaker Discord Channel!
Shotts
Playmaker Newbie
Posts: 5
Re: Just Starting - NPC Look Up and Down at Random Intervals
«
Reply #2 on:
March 03, 2020, 12:43:19 PM »
Thanks for responding djay.
If I'm interpreting your suggestion correctly, you are recommending that the 'Send Event' be dropped and move the 'Random Wait' so that it is the top action. That was my setup during my first attempt and the result was the character's head bouncing back and forth between the default animation pose and looking at the instructor. I'll try again when I get home tonight.
Logged
Broken Stylus
Beta Group
Hero Member
Posts: 773
Re: Just Starting - NPC Look Up and Down at Random Intervals
«
Reply #3 on:
March 03, 2020, 01:13:40 PM »
Well, you could use
Action Sequence
(right button in State tab, first option at the top of the list).
In a state, all actions are played in order but Action Sequence makes sure action 1 is completed before launching action 2, etc.
Logged
djaydino
Administrator
Hero Member
Posts: 7616
Re: Just Starting - NPC Look Up and Down at Random Intervals
«
Reply #4 on:
March 03, 2020, 01:24:39 PM »
Hi.
The Smooth look at on top is fine.
If you want head to keep looking until time is done, then you might need to set finish tolerance to 0.
and let the 'random wait' send the transition event
Logged
Join the PlayMaker Discord Channel!
Shotts
Playmaker Newbie
Posts: 5
Re: Just Starting - NPC Look Up and Down at Random Intervals
«
Reply #5 on:
March 03, 2020, 01:38:13 PM »
Thanks Stylus and Djay (again)!
I had assumed that each action had to finish before the next was taken. That clears up why some of the tutorial FSM's work when I didn't feel they should. The tolerance = 0 also sounds promising since I was previously getting some of the desired behavior and then it was cut off.
Logged
Shotts
Playmaker Newbie
Posts: 5
Re: SOLVED - Just Starting - NPC Look Up and Down at Random Intervals
«
Reply #6 on:
March 04, 2020, 09:25:13 AM »
Just to update for posterity, switching the tolerance of the 'Smooth Look At' action to zero accomplished what I wanted. There is still a split second where the gaze returns to the default animation pose but I've shifted things a bit so it looks more natural.
Thanks again for the assistance!
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
[SOLVED] - Just Starting - NPC Look Up and Down at Random Intervals