Quantcast

Jump to content

» «
Photo

Assign a single command line to multiple actors

2 replies to this topic
Zeb89
  • Zeb89

    Digital Artist

  • Members
  • Joined: 26 Feb 2007

#1

Posted 16 August 2013 - 09:53 PM

CODE

:SKUSPEED_2
if or
0611: actor 2@ performing_animation "RUN_CIVI"
0611: actor 2@ performing_animation "FIGHTIDLE"
0611: actor 2@ performing_animation "FIGHTA_BLOCK"
0611: actor 2@ performing_animation "FIGHTSH_BWD"
0611: actor 2@ performing_animation "FIGHTSH_FWD"
jf @SKUSPEED_3
0393: actor 2@ perform_animation "RUN_CIVI" at 3.0 times_normal_rate
0393: actor 2@ perform_animation "FIGHTIDLE" at 3.0 times_normal_rate
0393: actor 2@ perform_animation "FIGHTA_BLOCK" at 3.0 times_normal_rate
0393: actor 2@ perform_animation "FIGHTSH_BWD" at 3.0 times_normal_rate
0393: actor 2@ perform_animation "FIGHTSH_FWD" at 3.0 times_normal_rate
jump @SKUSPEED_3


Is there a way to assign single command lines to multiple actors at once, instead of just one at a time?

Hypothetically, something along the lines of...

CODE

0611: actor 2@, 3@, 4@, 5@, 6@ performing_animation "RUN_CIVI"


I read some reference somewhere in the original main.scm where the "#@"was replaced by "-1" and seemingly involved more actors. This however crashes the game in my case.

Anyone? Thanks.

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#2

Posted 17 August 2013 - 05:52 AM Edited by ZAZ, 17 August 2013 - 05:58 AM.

yes and no, working with AS_pack is more effective, look in the lesson about animations: click
build a as_pack and actor -1 represents multiple actor vars by using 0618:
CODE
0615: define_AS_pack_begin 30@
0605: actor -1 perform_animation_sequence "STR_B2C" from_file "STRIP"  4.0  0  0  0  1 -1 ms  
0605: actor -1 perform_animation_sequence "DNCE_M_A" from_file "DANCING"  4.0  0  0  0  1 -1 ms
0605: actor -1 perform_animation_sequence "STR_B2C" from_file "STRIP"  4.0  0  0  0  1 -1 ms
0605: actor -1 perform_animation_sequence "DNCE_M_A" from_file "DANCING"  4.0  0  0  0  1 -1 ms
0605: actor -1 perform_animation_sequence "STR_B2C" from_file "STRIP"  4.0  0  0  0  1 -1 ms
0605: actor -1 perform_animation_sequence "DAN_LOOP_A" from_file "DANCING"  4.0  0  0  0  1 -1 ms
0605: actor -1 perform_animation_sequence "DNCE_M_D" from_file "DANCING"  4.0  0  0  0  1 -1 ms
0616: define_AS_pack_end 30@


assigne actors to as_pack
CODE
0618: assign_actor $PLAYER_ACTOR to_AS_pack 30@
0618: assign_actor 1@ to_AS_pack 30@
0618: assign_actor 1@ to_AS_pack 30@


Ok, there isn't a code to insert multiple actor vars but you can shift them in a arrays loop
CODE
:assigne_multiple_actor
28@ = 3// amount of actors

for 27@ = 0 to 24
wait 0
   if
       001D:   28@ > 27@
   then  
       0618: assign_actor 0@(27@,24i) to_AS_pack 30@
   end
end


also possible, if you use only one animation
CODE
28@ = 3// amount of actors

for 27@ = 0 to 24
wait 0
   if
       001D:   28@ > 27@
   then  
       0605: actor 0@(27@,24i) perform_animation_sequence "STR_B2C" from_file "STRIP"  4.0  0  1  1  0 -1 ms
   end
end

Zeb89
  • Zeb89

    Digital Artist

  • Members
  • Joined: 26 Feb 2007

#3

Posted 17 August 2013 - 11:32 AM

My goal is to speed up various animations for multiple actors (specifically running and fighting) within 1 thread via opcode "0393".

AS seems to just allow you to play actor animations, but can you also alter their speed?

I'll try to give the commands by using the array system you provided.

Thank you for your time. Really appreciate the help.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users