News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: Some Questions  (Read 1987 times)

0 Members and 1 Guest are viewing this topic.

Offline AlphaTech

  • LostInSpace
  • Sr. Member
  • ***
  • Posts: 758
  • Gender: Male
  • The name's AlphaTECH, whatca need help with?! :)
    • View Profile
Some Questions
« on: July 24, 2015, 05:45:01 PM »
I have some questions about somethings, preferebly adding custom styles to ped's but not random.

Changing the color of the custom text, I have a thought on what does this but I haven't a clue how to work it ingame.

How to interact with normal AI type ped's and make triggered ped's respond to your script I need this for my Zombie Mod.

How do I make patrol path's I did a custom type path but it is kind of glitchy.

How do I make ped table, I read the tutorial's but I aint gettin it. I understand all types of other scripting but not tables.

@Daboss Lol told you I wouldn't get it I still need help. I'm a Newbie in table's I need help.

I need table's for Map's,Weapon's,Ped's,Car's,Gate Functions,Ped Functions,Ally Table,Enemy Table, and a lot more.

Hopefully I didn't warn out your patience but I need help and want this Zombie Mod to be created.

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Some Questions
« Reply #1 on: July 24, 2015, 06:14:30 PM »
If you want to add a "custom style" to a ped I assume you mean you want a ped to play some action nodes of yours. This should be simple, just make them play an action every few seconds, preferably checking if they are idle first (playing /Global/style/Default_KEY)

This post should really help you get how tables work. Originally the post was me replying to someone who wanted to make a menu, but it should also serve well as a tutorial for tables.

I've simply been using PedMoveToXYZ when I want peds to go places. If you want you could call it multiple times and it should just add to their tasks, meaning once they get to the first place they'll go to the second place.

PedSetEmotionTowardsPed may work for making peds respond to things. I'll add a list of emotions at the bottom.

There's 3 ideas I have for custom text:
1) Files in /Config/hdt.
2) TextAddParamString and TextPrint. As you probably know TextPrint only prints predefined strings in the text archives like american.img. However, I've seen places in the scripts like this:
      TextAddParamNum(gCurrentBet)
      TextPrint("MIF_BET02", 1, 2)
There is also a function TextAddParamString but isn't even once used in the scripts. I haven't got it to work yet myself, but what I think is that the predefined text things (like MIF_BET02) must have something in them that tells the game they require a number (and thus need that call to TextAddParamNum first) and if TextAddParamString wasn't at all used in the game's scripts... there may not be one like that in american.img for us to use, we may have to add one.
3) There's a script called SConsts.lur with a few values in it related to custom text. Play with them if you want, no idea if it'll get you anywhere or not.
  CUSTOM_FONT_STYLE0 = 0
  CUSTOM_FONT_STYLE1 = 1
  CUSTOM_FONT_STYLE2 = 2
  CUSTOM_FONT_STYLE3 = 3

Decompiled script: SConsts.lur (not by me)
Code: [Select]
FADE_IN = 1
FADE_OUT = 0
PUNISHMENT_NIGHT = 80
TRIGGER_NONE = -1
TAGTYPE_NONE = 0
TAGTYPE_NERD = 1
TAGTYPE_JOCK = 2
TAGTYPE_GREASER = 3
TAGTYPE_PREPPY = 4
TAGTYPE_VANDALISM = 5
TAGTYPE_CLEANUP = 6
DRIVINGMODE_STOPFORCARS = 0
DRIVINGMODE_SLOWDOWNFORCARS = 1
DRIVINGMODE_AVOIDCARS = 2
DRIVINGMODE_PLOUGHTHROUGH = 3
DRIVINGMODE_STOPFORCARS_IGNORELIGHTS = 4
DRIVINGMODE_MOWDOWNPEDS = 5
CUSTOM_FONT_STYLE0 = 0
CUSTOM_FONT_STYLE1 = 1
CUSTOM_FONT_STYLE2 = 2
CUSTOM_FONT_STYLE3 = 3
UNIQUE = -1
NOTDEFINED = 0
MAX_NUM_ESCAPEES = 10

Emotions:
0   Aggressive
1   Annoyed
2   Unfriendly
3   Dismissive
4   Very Scared
5   Scared
6   Intimidated
7   Friendly
8   Very Friendly

PedSetEmotionTowardsPed(Ped, Ped, Emotion) | Set the 1st ped's emotion to the 2nd ped
PedGetEmotionTowardsPed(Ped, Ped) | Returns ped's emotion toward 2nd ped