GTAStunting

GTA Series => GTA Modding => Topic started by: Shingetsu on September 14, 2012, 11:13:17 PM

Title: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: Shingetsu on September 14, 2012, 11:13:17 PM
This is all of my scripting main.scm :

Code: [Select]
DEFINE VERSION VICE 1.3

0002: jump ££Label008620
DEFINE MEMORY  34329

:Label008620
0002: jump ££Label008644
DEFINE OBJECTS  1
DEFINE OBJECT DOOR                        ; This is an unused object. You can put anything here.

:Label008644
0002: jump ££Label008658
DEFINE MISSIONS  0

;-------------MAIN---------------


:Label008658
03A4: name_thread "MAIN"
016A: fade  0 ()  0 ms
01F0: set_max_wanted_level_to  0
03AD: set_rubbish  0 (invisible)
03DE: set_pedestrians_density_multiplier_to  0
01EB: set_car_density_to  0
0111: set_wasted_busted_check_to  0 (disabled)
00C0: set_current_time  10  0
04E4: unknown_refresh_game_renderer_at -712.4792  1052.173
03CB: set_camera -712.4792  1052.173  18.07715
0053: $PLAYER_CHAR = create_player #NULL at -712.4792  1052.173  18.07715
01F5: $PLAYER_ACTOR = create_emulated_actor_from_player $PLAYER_CHAR
0330: set_player $PLAYER_CHAR infinite_run_to  1 (true)
0001: wait  0 ms
01B6: set_weather  0
00D6: if  0
8118:   NOT   actor $PLAYER_ACTOR dead
004D: jump_if_false ££Label0086FA
0352: set_actor $PLAYER_ACTOR skin_to "PLAYER"
038B: load_requested_models
0353: refresh_actor $PLAYER_ACTOR
0222: set_player $6 health_to  100.0

:Label0086FA
016A: fade  1 (back)  1000 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false ££Label0086FA
04BB: select_interiour  0  ;; select render area
01B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)
01B7: release_weather
0002: jump ££Label008725

:Label008725
0001: wait  1000 ms
0247: request_model #BKA
00D6: if  0
8248:   NOT   model #BKA available
004D: jump_if_false ££Label008749
0001: wait  1000 ms
0002: jump ££Label008725

:Label008749
038B: load_requested_models
0001: wait  1000 ms
0002: jump ££Label008757

:Label008757
0002: jump ££Label00875E

:Label00875E
009A: $7 = create_actor  4 #BKA at -606.7478 -332.5978  11.28901
015F: set_camera_position -828.9935  917.0188  38.70028  0.0  0.0  0.0
0160: point_camera -782.6692  850.2357  11.08462  2
0001: wait  3000 ms
015F: set_camera_position -382.6062 -513.3868  22.83041  0.0  0.0  0.0
0160: point_camera -378.4856 -565.9042  17.28306  1
0460: set_camera_pointing_time  0.0  10000
0001: wait  12000 ms
015F: set_camera_position -580.8517 -375.2814  20.19859  0.0  0.0  0.0
0160: point_camera -606.7478 -332.5978  11.28901  1
0460: set_camera_pointing_time  0.0  5000
0001: wait  1000 ms
0002: jump ££Label008839

:Label008839
0002: jump ££Label008840

:Label008840
0001: wait  2000 ms
0002: jump ££Label00884C

:Label00884C
0001: wait  1000 ms
0002: jump ££Label00884C

The Actor #COP did'nt spawn at postion i want :( :

:( Damn !! (http://www.youtube.com/watch?v=CRjMQL-I_1U#ws)
Title: Re: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: Shingetsu on September 15, 2012, 09:03:02 PM
Up ! Help :(
Title: Re: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: kaneda on September 16, 2012, 12:48:25 AM
Did the actor spawn at all? Or just not in the location you specified?

Try spawning your actor sooner in the script - like this:

Code: [Select]
:Label008725
0001: wait  1000 ms
0247: request_model #BKA
00D6: if  0
8248:   NOT   model #BKA available
004D: jump_if_false ££Label008749
0001: wait  1000 ms
0002: jump ££Label008725

:Label008749
009A: $7 = create_actor  4 #BKA at -606.7478 -332.5978  11.28901
038B: load_requested_models
0001: wait  1000 ms
0002: jump ££Label008757

:Label008757
0002: jump ££Label00875E

Sometimes it can be easier to seperate your threads a little. One set for your actor, another for your camera, etc. You have to kind of time it out in regards to your wait states, but having them as separate threads can make it easier to find where mistakes in the codes are.

create_thread ££actor
create_thread ££camera

Like that. You can also skip threads by simply commenting the create_thread opcodes out, rather than having to comment everything in the thread out.
Title: Re: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: Shingetsu on September 16, 2012, 05:28:08 AM
Did the actor spawn at all? Or just not in the location you specified?

Try spawning your actor sooner in the script - like this:

Code: [Select]
:Label008725
0001: wait  1000 ms
0247: request_model #BKA
00D6: if  0
8248:   NOT   model #BKA available
004D: jump_if_false ££Label008749
0001: wait  1000 ms
0002: jump ££Label008725

:Label008749
009A: $7 = create_actor  4 #BKA at -606.7478 -332.5978  11.28901
038B: load_requested_models
0001: wait  1000 ms
0002: jump ££Label008757

:Label008757
0002: jump ££Label00875E

Sometimes it can be easier to seperate your threads a little. One set for your actor, another for your camera, etc. You have to kind of time it out in regards to your wait states, but having them as separate threads can make it easier to find where mistakes in the codes are.

create_thread ££actor
create_thread ££camera

Like that. You can also skip threads by simply commenting the create_thread opcodes out, rather than having to comment everything in the thread out.

I Tried spawn sooner but it still spawn not at postion i want , even i changed the postion XYZ
Title: Re: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: Shirahama on September 16, 2012, 05:53:32 AM
All done \m/!!!
Title: Re: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: Shingetsu on September 16, 2012, 07:31:28 AM
All done \m/!!!
? Nerochaos ?
Title: Re: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: Shirahama on September 16, 2012, 09:14:22 PM
Your friends ? :))
Title: Re: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: Shingetsu on September 16, 2012, 09:20:01 PM
Your friends ? :))
Yes .
Title: Re: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: Shingetsu on September 16, 2012, 11:01:16 PM
kaneda can you have me again :( how can i set the point for actor ( where actor's watching ) like point of camera  :(
Title: Re: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: Basiµm on September 17, 2012, 02:51:42 AM
do you like editing?
Title: Re: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: Shirahama on September 17, 2012, 04:22:50 AM
do you like editing?

Oh!!! I think everyone wants it to be perfect :P
kaneda can you have me again :( how can i set the point for actor ( where actor's watching ) like point of camera  :(

That easy :). you can use the opcode on your script
Code: [Select]
009A: $7 = create_actor  4 #BKA at -606.7478 -332.5978  11.28901But changing the pos and load your actor requested models :P

I never use it but also know a little :a-cheer:
Title: Re: How to create an actor in Vice City - Vice Builder v1.3 ?
Post by: Shingetsu on September 17, 2012, 04:51:08 AM
do you like editing?

Oh!!! I think everyone wants it to be perfect :P
kaneda can you have me again :( how can i set the point for actor ( where actor's watching ) like point of camera  :(

That easy :). you can use the opcode on your script
Code: [Select]
009A: $7 = create_actor  4 #BKA at -606.7478 -332.5978  11.28901But changing the pos and load your actor requested models :P

I never use it but also know a little :a-cheer:
I'm Knew the opcode for my idea . end topic here
SimplePortal 2.3.7 © 2008-2025, SimplePortal