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

 Berserk/psycho actor

 
HeresOtis  
Posted: Friday, Aug 3 2012, 22:03
Quote Post


Mark Chump
Group Icon
Group: Members
Joined: Apr 29, 2011

XXXXX



How do I make an actor attack/shoot anything and everything, including the player?
I gave the actor a weapon and used these two opcodes, but the actor just stands there. It doesn't even retaliate when I shoot it.
CODE
0433: set_actor 1@ criminal_flag 1
07DD: set_actor 1@ attack_rate 100 // previously known as temper_to
PM
  Top
 

 
JACK JONES  
Posted: Saturday, Aug 4 2012, 07:03
Quote Post


Booom!!!
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



Removed

This post has been edited by JACK JONES on Saturday, Aug 4 2012, 07:39
PM
  Top
 

 
Michael-Knight1  
Posted: Thursday, Sep 6 2012, 08:33
Quote Post


Never Give UP
Group Icon
Group: Members
Joined: Jul 8, 2012

gr.gif

XXXXX



QUOTE (HeresOtis @ Friday, Aug 3 2012, 22:03)
How do I make an actor attack/shoot anything and everything, including the player?
I gave the actor a weapon and used these two opcodes, but the actor just stands there. It doesn't even retaliate when I shoot it.
CODE
0433: set_actor 1@ criminal_flag 1
07DD: set_actor 1@ attack_rate 100 // previously known as temper_to

I Thinks so ...

CODE

07DD: set_actor 1@ temper_to 100 // see pedstats.dat
02E0:   actor 1@ aggressive
Users WebsitePM
  Top
 

 
JACK JONES  
Posted: Thursday, Sep 6 2012, 08:44
Quote Post


Booom!!!
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



Hey "california city saguaro" 02E0 is this:
CODE
02E0:   actor 1@ firing_weapon

Which is by the way a conditional check lol.gif.
PM
  Top
 

 
Deji  
Posted: Thursday, Sep 6 2012, 13:51
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



Learn from the devil. You can't just command someone with free will. Instead you gotta just influence their free will devil.gif

CODE
{$VERSION 3.0.1000}
{$I constants.inc}
GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS scplayer 0.0 1.0 0.0 pos_x pos_y pos_z
CREATE_CHAR 20 #MALE01 pos_x pos_y pos_z my_char
SET_CHAR_SHOOT_RATE my_char TO 100
LOAD_CHAR_DECISION_MAKER 0 decision_murderer
SET_CHAR_DECISION_MAKER my_char decision_murderer
SET_CHAR_RELATIONSHIP my_char PED_RELATIONSHIP_HATE PEDTYPE_CIVMALE
CLEAR_CHAR_DECISION_MAKER_EVENT_RESPONSE decision_murderer EVENT_ACQUAINTANCE_PED_HATE
ADD_CHAR_DECISION_MAKER_EVENT_RESPONSE decision_murderer EVENT_ACQUAINTANCE_PED_HATE TASK_COMPLEX_KILL_PED_ON_FOOT 0.0 100.0 0.0 0.0 0 1
//SET_SENSE_RANGE my_char 150.0 // you could probably use this to make the char kill peds within [range] away from it


It's in SCR. I shouldn't have to apologise cause it's better. But I'll throw you a bone tounge2.gif

Decompiled in SCR with 'write opcodes' (note parameter order will won't be screwed):
CODE
04C4: get_offset_from_char_in_world_coords $PLAYER_ACTOR offset 0.0 1.0 0.0 store_to 1@ 2@ 3@
009A: create_char 20 model #MALE01 at 1@ 2@ 3@ store_to 0@
07DD: set_char_shoot_rate 0@ to 100
060A: load_char_decision_maker 0 store_to 1@
060B: set_char_decision_maker 0@ to 1@
077A: set_char_relationship 0@ relationship 4 to_ped_type 4
0708: clear_char_decision_maker_event_response 1@ event 36
0709: add_char_decision_maker_event_response 1@ event 36 task 1000 respect 0.0 hate 100.0 like 0.0 dislike 0.0 in_car 0 on_foot 1
0648: set_sense_range 0@ to 150.0


SCR will go fully public after plenty of 'quality-assurance' testing by me and Silent.


EDIT
Just noticed you wanted them to shoot the player as well... Simply use the lines:
CODE
SET_CHAR_RELATIONSHIP my_char PED_RELATIONSHIP_HATE PEDTYPE_CIVFEMALE
SET_CHAR_RELATIONSHIP my_char PED_RELATIONSHIP_HATE PEDTYPE_PLAYER1
SET_CHAR_RELATIONSHIP my_char PED_RELATIONSHIP_HATE PEDTYPE_CRIMINAL


For every (used) ped type you want the character to shoot at.

This post has been edited by Deji on Thursday, Sep 6 2012, 16:26
Users WebsitePM
  Top
 

 
HeresOtis  
Posted: Thursday, Sep 6 2012, 17:26
Quote Post


Mark Chump
Group Icon
Group: Members
Joined: Apr 29, 2011

XXXXX



Thanks.
PM
  Top
 

 

1 User(s) are reading this topic (1 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