Quantcast

Jump to content

» «
Photo

[GTA VC]Random Peds in Radious Sphere script doesn't work...

19 replies to this topic
TheThingy
  • TheThingy

    Nilbog Tourist

  • Members
  • Joined: 26 Jul 2012
  • None

#1

Posted 16 May 2014 - 06:27 AM Edited by TheThingy, 16 May 2014 - 06:30 AM.

I'm trying to edit a Zombie Mod script created by Aswin to work for GTA Vice City. I installed it into the main.scm, but nothing happens. This is the script:

 

004F: create_thread @ZOMBIEA_101

:ZOMBIEA
03A4: name_thread 'ZOMBIEA'

:ZOMBIEA_101                          
0001: wait 0 ms
04BB: select_interiour 0 // select render area
00D6: if and
0@ == 0 // if player is outside
0256: player $PLAYER_CHAR defined // because of just one Condition, the zombie will spawn instantly in starting,
004D: jump_if_false @ZOMBIEA_101  

:ZOMBIEA_120  
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0     // getting near by Coordinates or Position
05EF: 0@ = random_actor_near_point 4@ 5@ 6@ in_radius 10.0 find_next 1 pass_deads 0 //IF and SET
0245: set_actor 0@ walk_style_to 37  ///Tramp, more like a zombie tho.
0332: set_actor 0@ bleeding 1
0489: set_actor 0@ muted 1
05E2: AS_actor 0@ kill_actor $PLAYER_ACTOR  
0001: wait 1000 // wait a sec
 
:ZOMBIEA_130
0001: wait 0 ms
00D6: if
0118:   actor 0@ dead  
004D: jf @ZOMBIEA_130
0001: wait 500 ms
goto @ZOMBIEA_120


In45do
  • In45do

    Coding like a Dummy...

  • Members
  • Joined: 15 Jan 2012
  • Indonesia

#2

Posted 16 May 2014 - 07:46 AM

I don't know how GTA VC script works but I found a false in your script.

 

:ZOMBIEA_120  

04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0     
05EF: 0@ = random_actor_near_point 1@ 2@ 3@ in_radius 10.0 find_next 1 pass_deads 0 // You should change 4@ 5@ 6@ to 1@ 2@ 3@ because the previous code check it through 1@ 2@ 3@
0245: set_actor 0@ walk_style_to 37  ///Tramp, more like a zombie tho.
0332: set_actor 0@ bleeding 1
0489: set_actor 0@ muted 1
05E2: AS_actor 0@ kill_actor $PLAYER_ACTOR  
0001: wait 1000 // wait a sec


TheThingy
  • TheThingy

    Nilbog Tourist

  • Members
  • Joined: 26 Jul 2012
  • None

#3

Posted 16 May 2014 - 08:07 AM Edited by TheThingy, 16 May 2014 - 08:19 AM.

Thank you. I'm going to do that and test it.

 

Edit: My apologies. I had accidently posted twice. I was used to pms.

 

I just finished trying it out in the main.scm, but I still don't notice any changes. The Peds around me don't attack the Player. I think I might of installed it into the main.scm wrong, It's a little weird than gta sa main.scm. I tried to install this script to GTA VC Timetwisterv1. I just want to make this script make the peds in my sphere attack Tommy.


In45do
  • In45do

    Coding like a Dummy...

  • Members
  • Joined: 15 Jan 2012
  • Indonesia

#4

Posted 17 May 2014 - 06:01 AM

I forgot to tell you the variable 0@ from the first thread is not readable. (look below)

:ZOMBIEA_101                          

0001: wait 0 ms
04BB: select_interiour 0 // where do 0@ come from?
00D6: if and
0@ == 0                             // this condition will return false at anytime
0256: player $PLAYER_CHAR defined 
004D: jump_if_false @ZOMBIEA_101  

Otherwise use this command :

077E: get_active_interior_to 0@ 

Put opcode 077E after opcode 04BB. It will look like this :

:ZOMBIEA_101                          
0001: wait 0 ms
04BB: select_interiour 0
077E: get_active_interior_to 0@ 
00D6: if and
0@ == 0                            
0256: player $PLAYER_CHAR defined 
004D: jump_if_false @ZOMBIEA_101  

Note : The script will only make 1 ped attacks player.

  • Meheraj7 likes this

TheThingy
  • TheThingy

    Nilbog Tourist

  • Members
  • Joined: 26 Jul 2012
  • None

#5

Posted 17 May 2014 - 08:26 AM Edited by TheThingy, 17 May 2014 - 08:41 AM.

Thanks for your help. This script will only make 1 Ped attack player? So, to have everyone to attack player requires loading Peds instead of capturing Peds inside sphere? I tried in the past to extract the zombies spwaning script from Long Night, but it froze the game right when the Peds spawned. I'm going to try your fix, but is it possible to extract the script from Long Night (just free roaming zombie spawning)? Thanks.

 

Edit: I just tried the fix, but still nothing happens for me in the game.


In45do
  • In45do

    Coding like a Dummy...

  • Members
  • Joined: 15 Jan 2012
  • Indonesia

#6

Posted 17 May 2014 - 01:55 PM

What is Long Night mod?
Btw, I have recreate the script to be more effective. And I notice something else that make the script would be impossible to work. This one :

05EF: 0@ = random_actor_near_point 1@ 2@ 3@ in_radius 10.0 find_next 1 pass_deads 0  

And this is my version (recreated and untested) :

004F: create_thread @ZOMBIEA_101 // Incase if something wrong again, would you mind to change the @ZOMBIEA_101 to @ZOMBIEA?

:ZOMBIEA
03A4: name_thread 'ZOMBIEA'
04BB: select_interiour 0

:ZOMBIEA_101                          
wait 0 ms
077E: get_active_interior_to 0@ 
if and
0@ == 0 
0256: player $PLAYER_CHAR defined 
jf @ZOMBIEA_101
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0    
05EF: 4@ = random_actor_near_point 1@ 2@ 3@ in_radius 10.0 find_next 0 pass_deads 1  

:ZOMBIEA_120  
wait 0 ms
if
056D:   actor 4@ defined
jf @ZOMBIEA_101
0245: set_actor 4@ walk_style_to 37 
0332: set_actor 4@ bleeding 1
0489: set_actor 4@ muted 1
05E2: AS_actor 4@ kill_actor $PLAYER_ACTOR  
wait 1000 ms
 
:ZOMBIEA_130
wait 0 ms
if
0118:   actor 4@ dead  
jf @ZOMBIEA_130
01C2: remove_references_to_actor 4@
wait 100 ms
goto @ZOMBIEA_101

And last, tell me if I'm using GTA SA opcode in the script because I never seen GTA VC opcode before. :)


xNCx
  • xNCx

    Street Cat

  • Members
  • Joined: 15 May 2008
  • None

#7

Posted 17 May 2014 - 08:09 PM

Your SA script won't work in VC, because the latest opcode in VC is close to 05FF... Or 05EE... Anyway, 077E is definitely not available in VC :D.


TheThingy
  • TheThingy

    Nilbog Tourist

  • Members
  • Joined: 26 Jul 2012
  • None

#8

Posted 18 May 2014 - 02:05 AM Edited by TheThingy, 18 May 2014 - 02:25 AM.

Thank you to the both of you. I'm going to test the script immediately and report back.

 

Edit: So, I tested the script but nothing happened. The Peds don't attack player. The script I posted was Ashwin's script to a zombie testing script for GTA SA that was unfinished. I looked online and in sanny builder data opcodes txt to find alternate counterparts to use for Vice City instead.

 

What's the GTA VC Long Night? I'll post the link to it:

http://www.moddb.com.../gta-long-night

 

I don't want any missions from that. I just want the zombies to spawn and attack the player (a free roaming, per say)..Is there any way to just extract the zombies spawning in the map script? I tried getting in contact with the creator of the mod for like two weeks, but I still get no response...


In45do
  • In45do

    Coding like a Dummy...

  • Members
  • Joined: 15 Jan 2012
  • Indonesia

#9

Posted 18 May 2014 - 06:12 AM

xNCx That might be the cause the script won't work.

TheThingy I can give you more idea to make it work by spawning the ped and not restrict them in sphere. But I'm afraid my steps is not working on GTA VC. The best way is contact someone who experience at coding GTA VC. Maybe Ashwin.Star can help you.


TheThingy
  • TheThingy

    Nilbog Tourist

  • Members
  • Joined: 26 Jul 2012
  • None

#10

Posted 18 May 2014 - 07:28 AM Edited by TheThingy, 18 May 2014 - 08:07 AM.

Thanks, In45do. But, Ashwin can't help me, because he's very busy with projects, etc. I have a question. Is it possible to extract the zombie spawning script from the following:

http://www.moddb.com...on-city-stories

 

I just want zombies spawning everywhere I go. Or is it possible to strip both main.scm so that I only have a main.scm to try (no missions, and no other files required to play?).

 

Edit 1: In45do: do you know how to make it to spawn like 6-8 Peds and attack player, then when those Peds die another different 6-8 Peds will spawn to attack player, too? But only make the next group of Peds spawn after you get rid of the previous group or when you're not in the same area as them?  What I'm thinking of is something like in the GTA VC Long Night videos, but with less zombies, like maybe 6-8 Peds spawning at a time. At first I wanted it for GTA SA, but it wasn't working well, because the same exact few types of peds only spawned and the dessert eagle would make my game freeze. everytime I was running the zombie script-usually seemed to happen when the zombie peds were bleeding & I reloaded.


In45do
  • In45do

    Coding like a Dummy...

  • Members
  • Joined: 15 Jan 2012
  • Indonesia

#11

Posted 18 May 2014 - 10:06 AM

Why don't you make it to CLEO version first?


TheThingy
  • TheThingy

    Nilbog Tourist

  • Members
  • Joined: 26 Jul 2012
  • None

#12

Posted 19 May 2014 - 06:05 AM

The reason is because later I want to play it on xbox. If it works on PC it will work on xbox-as long as it's installed in the main.scm & not as cleo. Xbox doesn't support cleo. But, it does support the mod installed in the main.scm. I just have to transfer over the modded main.scm and play it. I already did this for GTA SA for xbox, but I was looking for a mod that spawns around 15 zombie peds at a time (each different group of peds consisting of different Ped Id's).


In45do
  • In45do

    Coding like a Dummy...

  • Members
  • Joined: 15 Jan 2012
  • Indonesia

#13

Posted 20 May 2014 - 03:48 AM

I see what you did there. I think it is better for you to know scripting CLEO first, I said that because the basic scripting was in CLEO. But, it's up to you because I don't know how GTA VC script works.


TheThingy
  • TheThingy

    Nilbog Tourist

  • Members
  • Joined: 26 Jul 2012
  • None

#14

Posted 20 May 2014 - 10:05 PM

Yeah, I understand what you mean. But, I'm really a goofball about getting to learn scripting. I only get little things. I have a question: I installed a zombie mod into gta sa main.scm. But, it always only spawns the same old few Peds. The script is made to catch random ped in sphere in radius and make them attack you. If the radius is bigger then the game will spawn less type of ped id's? I already tried bumping up the ped count in popcycle.dat, but my game keeps crashing probably because the zombies are bleeding and plus I have them as dismemberment possible which causes even more blood when shot at.

All this causes it to freeze near the beach area (santa maria beach) where there's all those palm trees.

 

Is there a way to make the zombies be bleeding while alive, but, not bleed when you kill them?


In45do
  • In45do

    Coding like a Dummy...

  • Members
  • Joined: 15 Jan 2012
  • Indonesia

#15

Posted 21 May 2014 - 01:31 PM

Is there a way to make the zombies be bleeding while alive, but, not bleed when you kill them?

I don't know if it works but... just try it.

:Bleeding
0332: set_actor 0@ bleeding 1    

:Death_Check
wait 0 ms
if
0118:   actor 0@ dead
jf @Death_Check
0332: set_actor 0@ bleeding 0
01C2: remove_references_to_actor 0@ // Like turning an actor into a random pedestrian
jump @First_Thread // just a random thread

That part of code is useful to deactivate the bleeding.


TheThingy
  • TheThingy

    Nilbog Tourist

  • Members
  • Joined: 26 Jul 2012
  • None

#16

Posted 21 May 2014 - 10:55 PM Edited by TheThingy, 21 May 2014 - 10:56 PM.

Thank, you. Is this for GTA SA? I'll be more detailed (sorry) for example;

I added the following script in gta sa:

0446: set_actor 1@(17@,16i) dismemberment_possible 1  ///1 means yes will lose head and blood appears

 

I notice that when shot in the head with desert eagle, shotgun, assault rifle, etc, the head dissapears and a lot of blood appears. Is there a way to literally not have the blood appear when this happens? like maybe have them just lose head, but no blood? I'll probably have to edit the particle.txd, correct? Thanks again for helping me.

 

Then, again I'll probably have to disable dismemberment? I did that to a different mod and it did seem to help reduce lag.


In45do
  • In45do

    Coding like a Dummy...

  • Members
  • Joined: 15 Jan 2012
  • Indonesia

#17

Posted 22 May 2014 - 10:58 AM

Which "blood appears" you talking about? There are many variation of blood in GTA SA.


TheThingy
  • TheThingy

    Nilbog Tourist

  • Members
  • Joined: 26 Jul 2012
  • None

#18

Posted 22 May 2014 - 10:54 PM

It appears right when the Peds' head is shot off. There's this splurt that appears.


In45do
  • In45do

    Coding like a Dummy...

  • Members
  • Joined: 15 Jan 2012
  • Indonesia

#19

Posted 23 May 2014 - 11:55 AM

I'm not sure but there's no way you can deactivate that effect. Unless you do something on effect.fxp.


TheThingy
  • TheThingy

    Nilbog Tourist

  • Members
  • Joined: 26 Jul 2012
  • None

#20

Posted 24 May 2014 - 05:19 AM

Hey, that sounds like a good idea. I just need to find out what the effect is called in the effect.fxp file. Thanks again.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users