IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Main.scm- How to make a ped loop an animation

 HALP?
 
hellya2011  
Posted: Tuesday, Feb 21 2012, 09:25
Quote Post


Hellya2011
Group Icon
Group: Members
Joined: Sep 23, 2009

us.gif

XXXXX



what i basically want is that, im trying to place a pedestrain at X Y Z Cords on my map, and have them loop an animation such as player_idle or other animations, but all my attempts at tying to code it leads into gtasa crashing upon loading. can someone please give me a simple code to place in my main.scm to have a ped looping an animation? sad.gif
Users WebsitePM
  Top
 

 
Frank.s  
Posted: Tuesday, Feb 21 2012, 10:08
Quote Post


 
Group Icon
Group: Members
Joined: Apr 15, 2008

en.gif

Member Award




I don't think it's possible to play player anims on a pedestrian ('cos of different bones).

See the loop 0/1 option? That's it. icon14.gif
GTAGarage documentation of all different opcodes should give any extra help/info you might need. Just put the opcode in the url like i did with that link, not all opcodes are documented thought, only the most common ones. (sometimes not even those)
Code taken from GTAGarage's Opcode 0605 documentation:
CODE
:LoadAnim
0247: load_model #BFORI
04ED: load_animation "MISC"

:CheckAnim
0001: wait 0 ms
00D6: if and
0248:   model #BFORI available
04EE:   animation "MISC" loaded
004D: jump_if_false @CheckAnim
009A: 0@ = create_actor_pedtype 5 model #BFORI at 0.0 0.0 0.0
0605: actor 0@ perform_animation_sequence "BMX_COMEON" IFP_file "MISC" 4.0 loop 0 lockX 0 lockY 0 lockF 0 time -1
0249: release_model #BFORI
04EF: release_animation "MISC"
004E: end_thread
PM
  Top
 

 
hellya2011  
Posted: Tuesday, Feb 21 2012, 10:44
Quote Post


Hellya2011
Group Icon
Group: Members
Joined: Sep 23, 2009

us.gif

XXXXX



ok, thanks for the code, im still must have a misunderstanding though

i put this at the "put your create threads here"
CODE

004F: create_thread @PED1


then in the thread section i put this

CODE

:PED1
03A4: name_thread "PED1"
0247: load_model #BFORI
04ED: load_animation "MISC"

:PED2
0001: wait 0 ms
00D6: if and
0248:   model #BFORI available
04EE:   animation "MISC" loaded
004D: jump_if_false @CheckAnim
009A: 0@ = create_actor_pedtype 5 model #BFORI at 0.0 0.0 0.0
0605: actor 0@ perform_animation_sequence "BMX_COMEON" IFP_file "MISC" 4.0 loop 0 lockX 0 lockY 0 lockF 0 time -1
0249: release_model #BFORI
04EF: release_animation "MISC"
004E: end_thread


im sure i have a part messed up, but i have no clue which part i did wrong

i also try putting it in the Mission 0 Section without the create threads, but sannybuilder changes it into
CODE

:MAIN_297
0001: wait $DEFAULT_WAIT_TIME ms
00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes
0002: jump @MAIN_297
0247: load_model #BFORI
04ED: load_animation "MISC"

:MAIN_329
0001: wait 0 ms
00D6: if and
0248:   model #BFORI available
04EE:   animation "MISC" loaded
004D: jump_if_false @MAIN_329
009A: 0@ = create_actor_pedtype 5 model #BFORI at 0.0 0.0 0.0
0605: actor 0@ perform_animation_sequence "BMX_COMEON" IFP_file "MISC" 4.0 loop 0 0 0 0 time -1 // versionA
0249: release_model #BFORI
04EF: release_animation "MISC"
004E: end_thread


and gtasa still crashes confused.gif

This post has been edited by hellya2011 on Tuesday, Feb 21 2012, 10:47
Users WebsitePM
  Top
 

 
Frank.s  
Posted: Tuesday, Feb 21 2012, 12:19
Quote Post


 
Group Icon
Group: Members
Joined: Apr 15, 2008

en.gif

Member Award




Tutorial Forum List
There are at least 5 coding tutorials there, you seem like you'd appreciate them. icon14.gif
PM
  Top
 

 
hellya2011  
Posted: Saturday, Mar 3 2012, 01:57
Quote Post


Hellya2011
Group Icon
Group: Members
Joined: Sep 23, 2009

us.gif

XXXXX



thanks for all the help, i finally got them working.... still not sure what i was doing wrong, but they work now biggrin.gif
Users WebsitePM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG