21-03-13, 01:36 | #5451 |
Member
Joined: Dec 2012
Posts: 1,924
|
how i can script underwater sprint i made the animation but i don't know how to script it
|
21-03-13, 13:24 | #5452 |
Member
Joined: May 2010
Posts: 1,187
|
Try this:
Animation= (your animation), (KEY1, if used), (KEY2, if used), IGNORE, IGNORE, IGNORE, IGNORE, -86 (normal swimming animation) |
21-03-13, 15:34 | #5453 |
Member
Joined: Dec 2012
Posts: 1,924
|
|
24-03-13, 21:11 | #5454 |
Moderator
Joined: Jul 2003
Posts: 33,352
|
How can I disable the use of a switch?
I have this switch setup and Lara should not be able to use the switch again right away due to the rest of the setup which involves some animations that need to be completed before she can use the switch again. I can't use a timer on the switch due to the above setup. So far I'm using the flipeffect "disable ACTION" but this also prevents the player from doing any other actions that involve the ACTION button, like exiting the game, so I'd rather use a way to disable the use of the switch only. If possible... I seem to remember reading about such a thing once but memory fails me... |
25-03-13, 07:01 | #5455 |
Moderator
Joined: Dec 2011
Posts: 4,872
|
Are you ready for some variables?
Then see my Hidden Triggers tutorial on Skribblerz: see Page 7 (Chapter 1.44 and 1.45) - it allows you to disable/enable pulley or crowbar switch any time. If you don't know what A, X and Y are in the formulas there then see Page 3 for the description of the formulas. Each "formula" means a TriggerGroup. Activate that TriggerGroup by F118 triggers to disable/enable the switch. Please check if the formula is savegame-stable or not. If it is not, then see Chapter I-27 on Page 2. |
25-03-13, 13:47 | #5456 |
Moderator
Joined: Jul 2003
Posts: 33,352
|
Thanks.
I'll give it a try. If ti fails (the setup probably needs more variables...) I can always stick with the current "disable action" setup. Btw, you mention pulley and crowbar-switch, but does it also work with the small wallmounted leverswitch? |
25-03-13, 18:26 | #5457 |
Moderator
Joined: Dec 2011
Posts: 4,872
|
No, those work only with crowbar switch/pulley.
In this tutorial I used a trick (see Chapter 1 and Chapter 3.1) so that Lara cannot switch off a lever switch: http://www.skribblerz.com/tuts/ngle/...hsequences.htm But that trick doesn't seem to work with any switches, with any situation. I think, if you want to disable/enable any switch, any time, then you should use something complicated: - the switch must be in an ANIMATING slot, with all the animations having 0 State ID (you don't need the real switch), - place that "switch" (activated, i.e. having all the OCB codebits on - which causes nothing now* but let you to force animations on it later) (*: it is true only if Animation0 of the "switch" is the "switched off" [one framed loop] animation) - don't place any trigger below the "switch", - you need GlobalTrigger1 to switch on the switch and GlobalTrigger2 to switch off the switch, - GlobalTrigger1: = CONDITION: a, a proper position (see: TestPosition command) for Lara to switch on, and b, "switched off" (one framed loop) animation of the switch, and c, the player uses CTRL, and d, Lara is standing and still (Animation103), and e, Lara’s hands are empty (or at most she only has a flare): see ENV_FREE_HANDS (because, naturally, weapons in her hand wouldn’t be logical now) = EXECUTABLE: a, force her "switching on that switch" animation on Lara, and b, force its "I'm being switched on" animation on the switch - GlobalTrigger2: = CONDITION: a, a proper position (see: TestPosition command) for Lara to switch off, and b, "switched on" (one framed loop) animation of the switch, and c, the player uses CTRL, and d, Lara is standing and still (Animation103), and e, Lara’s hands are empty (or at most she only has a flare) = EXECUTABLE: a, force her "switching off that switch" animation on Lara, and b, force its "I'm being switched off" animation on the switch - And you need more GlobalTriggers: GlobalTrigger3: = CONDITION: "switched off" (one framed loop) animation of the switch = EXECUTABLE: antitrigger you want to antitrigger GlobalTrigger4: = CONDITION: "switched on" (one framed loop) animation of the switch = EXECUTABLE: trigger you want to trigger GlobalTrigger5 (to disable the ability to extract weapons or any wrong movement when Lara using that switch): = CONDITION: a, Lara is switching on the switch (animation) or b, Lara is switching off the switch (animation) = EXECUTABLE: disable all the keys = EXECUTABLE (if not true): enable all the keys So: - disable GT1 till you want to disable to switch on the switch - disable GT2 till you want to disable to switch off the switch |
25-03-13, 18:50 | #5458 |
Member
Joined: Jan 2012
Posts: 2,090
|
really complicated for such thing like not letting lara use a swtich
|
25-03-13, 18:51 | #5459 |
Moderator
Joined: Jul 2003
Posts: 33,352
|
Something tells me it is not worth the hassle in this case since it looks like it might interfere with the rest of the setup which also needs some conditions and variables!
I guess I'll first focus on the rest of the setup and leave my current "disable ACTION" for now. I'll see how it goes. If the "disable ACTION" is not convenient after all I'll see what I can do witht he above info. ** info saved on HD** *** EDIT *** Actually, the setup gives me an idea. Since the switch does not start out as a switch, it is broken and needs to be fixed first, I'll need to use a puzzle-hole at first so Lara can insert the "fixing part", then the puzzle-done instantly moves into the ground while at the same time, the actual switch instantly moves up at the same time. (I also used this sort of setup for the turnswitch in the first MoA levels so this should also work in this case.) The switching places of the puzzle-done and the actual switch can also take place when the switch is used. I'm already using an Organizer in the setup so far so it should be easy enough to switch them and then after a certain amount of seconds, make them switch places again so the switch is back up and useable again. Ah, something worth looking into. Last edited by Titak; 25-03-13 at 19:00. |
25-03-13, 19:43 | #5460 | |
Moderator
Joined: Dec 2011
Posts: 4,872
|
Then tell me about your results later.
Quote:
How can Von Croy use a switch/how can Lara use the same switch. (I.e. it is also a setup for a Lara/enemy switch.) |
|
Thread Tools | |
|
|