12jango Posted September 8, 2011 Share Posted September 8, 2011 Is there any way to make an absolute command that would affects all kinds of pedtypes? For Drug Dealer, Gangs, etc are not going to follow any commands that I made (except commands to kill him) like performing animation. Thanks! Link to comment Share on other sites More sharing options...
ZAZ Posted September 8, 2011 Share Posted September 8, 2011 (edited) Is there any way to make an absolute command that would affects all kinds of pedtypes? For Drug Dealer, Gangs, etc are not going to follow any commands that I made (except commands to kill him) like performing animation. Thanks! Only this method to count from 0 to 35584 and check if it is an instance of an actor Wesser posted a method to get every actor in the gameworld, also those of missions, extern scripts as well as other cleo script except those of the food stores like burgershop etc. here: call_func @getActorInSphere The for loop repeats a block of code while a control variable runs through an arithmetic progression. A smaller and faster vaiation was done by Deji. Find the template >here< I recompiled the script to get access and push the actors in arrays because it needs to controle more actors at same time and each actor needs his own variable the script below runs throw 6 subscripts after keypress backspace first gosub to to count from 0 to 35584 and check if it is an instance of an actor if it is an actor, then create_actor fire (it can find max. 12 actors) wait 2 sekonds second gosub to remove then actor and fire instances the other gosubs are repeating the first two gosubs for 2 times {$CLEO .cs}:RandomActor_FIRE_byusinga_countingcheck03A4: name_thread 'RANDAFR' :RANDAFR_110001: wait 0 ms if 0256: player $PLAYER_CHAR defined jf @RANDAFR_11if0AB0: key_pressed 8// backspacejf @RANDAFR_11 0050: gosub @RANDAFR_start_random_check 0001: wait 2000 ms 0050: gosub @RANDAFR_remove_actorfire 0001: wait 250 ms 0050: gosub @RANDAFR_start_random_check 0001: wait 2000 ms 0050: gosub @RANDAFR_remove_actorfire 0001: wait 250 ms 0050: gosub @RANDAFR_start_random_check 0001: wait 2000 ms 0050: gosub @RANDAFR_remove_actorfire 0001: wait 250 msjump @RANDAFR_11 :[email protected] = 0 [email protected] = 0 :RANDAFR_countingcheckLoop0085: [email protected] = [email protected] // (int) [email protected] = 0 :RANDAFR_CheckLoopif and056D: actor [email protected] defined 803C: not $PLAYER_ACTOR == [email protected] // (int) jf @RANDAFR_countingcheck1 0085: [email protected]([email protected],12i) = [email protected] // (int) 0326: [email protected]([email protected],12i) = create_actor [email protected]([email protected],12i) fire [email protected] += 1 jump @RANDAFR_countingcheck2 :[email protected] += 1 [email protected] += 1 [email protected] > 127 jf @RANDAFR_CheckLoop :[email protected] += 256 if [email protected] > 12 [email protected] > 35584 jf @RANDAFR_countingcheckLoop return :RANDAFR_remove_actorfire0006: [email protected] = 0 :RANDAFR_remove_10001: wait 0 ms if 001B: 13 > [email protected] jf @RANDAFR_remove_end 02D1: remove_fire [email protected]([email protected],12i) 01C2: remove_references_to_actor [email protected]([email protected],12i) // Like turning an actor into a random pedestrian 000A: [email protected] += 1 jump @RANDAFR_remove_1 :RANDAFR_remove_end0051: return script below creates markers above actors it repeats allways 2 gosubs {$CLEO .cs}:RandomActor_MARKER_byusinga_countingcheck03A4: name_thread 'PEDMARK' 0006: [email protected] = 0 :PEDMARK_18wait 0 if 0256: player $PLAYER_CHAR defined jf @PEDMARK_18 077E: get_active_interior_to [email protected] if [email protected] == 0 jf @PEDMARK_18 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 gosub @PEDMARK_171 wait 300 gosub @PEDMARK_344 jump @PEDMARK_18 :[email protected] = 0 [email protected] = 0 :PEDMARK_1850085: [email protected] = [email protected] // (int) [email protected] = 0 :PEDMARK_200if and056D: actor [email protected] defined 803C: not $PLAYER_ACTOR == [email protected] // (int) 8118: not actor [email protected] dead jf @PEDMARK_278 0085: [email protected]([email protected],12i) = [email protected] // (int) 0187: [email protected]([email protected],12i) = create_marker_above_actor [email protected]([email protected],12i) jump @PEDMARK_264 :[email protected] += 1 jump @PEDMARK_306 :[email protected] += 1 [email protected] += 1 [email protected] > 127 jf @PEDMARK_200 :[email protected] += 256 if [email protected] > 10 [email protected] > 35584 jf @PEDMARK_185 return :PEDMARK_3440006: [email protected] = 0 :PEDMARK_351wait 0 if 11 > [email protected] jf @PEDMARK_427 if 8039: not [email protected]([email protected],12i) == -1 jf @PEDMARK_404 0164: disable_marker [email protected]([email protected],12i) :PEDMARK_40401C2: remove_references_to_actor [email protected]([email protected],12i) // Like turning an actor into a random pedestrian [email protected] += 1 jump @PEDMARK_351 :PEDMARK_427return script below shows red smoke above every actor it reapeats permanent 2 gosubs to find 25 actors, shows smoke and remove their reference {$CLEO .cs}:RandomActor_SMOKE_byusinga_countingcheckthread 'RACTSMK':RACTSMK_11wait 0 if 0256: player $PLAYER_CHAR defined jf @[email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1 [email protected] = -1gosub @RACTSMK_175 wait 0 gosub @RACTSMK_336jump @RACTSMK_11 :[email protected] = 0 [email protected] = 0 :RACTSMK_1890085: [email protected] = [email protected] // (int) [email protected] = 0 :RACTSMK_204if and056D: actor [email protected] defined 803C: not $PLAYER_ACTOR == [email protected] // (int) jf @RACTSMK_270 0085: [email protected]([email protected],32i) = [email protected] // (int)04C4: create_coordinate [email protected] [email protected] [email protected] from_actor [email protected] offset 0.0 0.0 1.2095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 1.0 RGBA 1.0 0.0 0.0 1.0 size 0.5 last_factor 0.1//red 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 3.0 RGBA 1.0 0.0 0.0 1.0 size 0.5 last_factor 0.1//red 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 5.0 RGBA 1.0 0.0 0.0 1.0 size 0.5 last_factor 0.1//red [email protected] += 1 jump @RACTSMK_298 :[email protected] += 1 [email protected] += 1 [email protected] > 127 jf @RACTSMK_204 :[email protected] += 256 if [email protected] > 24 [email protected] > 35584 jf @RACTSMK_189 return :[email protected] = 0 :RACTSMK_343wait 0 if 25 > [email protected] jf @RACTSMK_397if not [email protected]([email protected],32i) == -1 jf @RACTSMK_345 01C2: remove_references_to_actor [email protected]([email protected],32i) // Like turning an actor into a random pedestrian :[email protected] += 1 jump @RACTSMK_343 :RACTSMK_397return Edited September 8, 2011 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Wesser Posted September 8, 2011 Share Posted September 8, 2011 @ZAZ, I prefer using the newest method I discovered, here. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
Deji Posted September 8, 2011 Share Posted September 8, 2011 Or the fastest and easiest way... 00A0: store_actor $PLAYER_ACTOR position_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3if 0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 10.0 find_next 0 pass_deads 1then repeat 0321: AS_actor [email protected] die_headshotted until 8AE1: not [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 10.0 find_next 1 pass_deads 1end Link to comment Share on other sites More sharing options...
Wesser Posted September 8, 2011 Share Posted September 8, 2011 I guess, it does the same thing. It's likely it is the only way to do it. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now