![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
03-09-10, 07:14 AM
|
#1 | |
|
Admiral
![]() Join Date: Jan 2004
Location: netherlands
Posts: 2,021
Downloads: 131
Uploads: 0
|
Quote:
__________________
we live we die but death does not ends it. Jim Morrison 1943-1971 |
|
|
|
03-09-10, 07:37 AM
|
#2 |
|
CINC Pacific Fleet
![]() |
|
|
|
03-09-10, 12:47 PM
|
#3 |
|
Commodore
![]() Join Date: Mar 2005
Location: France
Posts: 614
Downloads: 60
Uploads: 0
|
this thread is of top interest!
I can't thank you enough for sharing your knowledge, Heretic ![]() Hell I could kiss you... Hey, point that torpedo somewhere else!!
|
|
|
03-09-10, 01:43 PM
|
#4 | |||||
|
Commodore
![]() |
Moving people around
Wp:Teleport("waypoint"); Instantly teleports actor to the waypoint Wp:Goto("waypoint"); actor walks to the waypoint. If the waypoint you're trying to reach is in another room, the actor will reach the transition waypoint, go into the crucifiction pose (default unanimated postion), and teleport to the transition waypoint in the next room. Looks goofy. It's better to take control and only goto the transition waypoint, then teleport to the next room and continue from there. Example: I want the WO to move from the control room ladder (CR_Stairs) back to his regular position in the fore quarters. Rather than doing this: Quote:
Quote:
Generally, when you want to move people around, it's best to find out where they are first. You don't want to trigger your new sequence if he's already there, right? Wp:IsCurrentWaypoint("waypoint") will tell you that. For the example above, we'd only want the WO to walk from the ladder if that's where he's currently located, so we put our move logic into an if statement conditioned off his current waypoint. If he's not at CR_STAIRS, it won't be executed. I've highlighted the syntax. Quote:
It's sometimes preferable to use 'not' logic on that check. Suppose I want to send the WO to waypoint WT_CR02 on the bridge when surfaced. I don't care where he's currently at, if he's not on the bridge. An exclamation point in front of the check reverses the logic. So !Wp:IsCurrentWaypoint("waypoint") means not at that waypoint. If he's aready there, we'll add an else condition and have him perform the appropriate animation. Quote:
Quote:
__________________
- heretic I enjoy drinking beer. MightyFine Crew Mod 1.2.1 - Updated 22 March MightyFine Less Annoying Footsteps Crew AI Scripting Information Last edited by Heretic; 03-09-10 at 02:45 PM. |
|||||
|
|
03-10-10, 11:16 AM
|
#5 |
|
Admiral
![]() Join Date: Jan 2004
Location: netherlands
Posts: 2,021
Downloads: 131
Uploads: 0
|
See ya in 5 months then.
__________________
we live we die but death does not ends it. Jim Morrison 1943-1971 |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
