|
 |
|
|
|
|
|
GTA Modification Forums
The Modders Lounge Ideas/Feedback/Suggestions
 |
|
 |
| |
Ify24  |
Posted: Tuesday, Jul 31 2012, 18:12
|
0x00000000 --> invisible

Group: Members
Joined: Aug 17, 2011


|
Oh silly me. Thanks guys. EDIT: So, as you may noticed, I am making a new health bar. I will use it for my mod. And I need a little help. So here is the script: | CODE | // Thread: Health :HEALTH thread 'HEALTH' wait 100 ms
:HEALTH_1 wait 0 ms 0223: set_actor $PLAYER_ACTOR health_to 90 0390: load_txd_dictionary 'BAR' 038F: load_texture "BARONELO" as 1 // Load dictionary with 0390 first 038F: load_texture "BARONELO1" as 2 // Load dictionary with 0390 first 03F0: enable_text_draw 1
:DRAW wait 0 ms 0226: $HEALTH = actor $PLAYER_ACTOR health 03E3: set_texture_to_be_drawn_antialiased 1 038D: draw_texture 1 position 209.5 415.0 size 120.0 12.0 RGBA 255 255 255 255 :Check_5 wait 0 ms if not $HEALTH > 85 jf @DRAW jump @DRAW_2
:DRAW_2 wait 1 ms 03E3: set_texture_to_be_drawn_antialiased 1 038D: draw_texture 2 position 209.5 415.0 size 120.0 12.0 RGBA 255 255 255 255 jump @DRAW_2 |
This is just a example. So basicly what I will be doing is drawing new texture whenever will player loss or gain health. But there is a little 'problem' in script. First bar baronelo is blinking until baronelo1 is drawn. And I knew this will happen, but how to fix it? This post has been edited by Ify24 on Wednesday, Aug 1 2012, 11:51
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Mister X  |
Posted: Wednesday, Aug 8 2012, 09:11
|
Square Civilian

Group: Members
Joined: Dec 25, 2007

|
Someone can help me? I'm really shame opening thread for every silly thing,so I think someone can help me from here I'm doing a script on some pickup. The problem is: for some problem,I cannot use the opcode "if picked up" because it's a Bribe,and if anyone has ever picked up a single bribe the IF would return me every time YES,so the script f*cked up very soon. So,I must use another way: if the player is near the bribe (VERY close),I clear the wanted level. Easy: | CODE | 00D6: if 8039: not 7@ == 0 // integer values 80F6: not player $PLAYER_CHAR 0 -1093.1843 -711.0524 11.7914 radius 2.0 2.0 2.0 004D: jump_if_false @LABELBRIBEPICKED |
Off course,doesn't work if I'm on a vehicle (it doesn't never jump on desidered label).. I used EVERY opcode related to player-vehicle,but I can't do it work...Some advice? So what opcode I can use to check if player vehicle is "going" into that coordinates? Unfortunatelly I'm coding Vice City,so it's hard to find good opcode. This post has been edited by Mister X on Wednesday, Aug 8 2012, 09:21
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
SilentPL  |
Posted: Wednesday, Aug 8 2012, 11:49
|
Senior File Manager

Group: Members
Joined: Feb 1, 2010



|
| QUOTE (Mister X @ Wednesday, Aug 8 2012, 11:11) | | I'm doing a script on some pickup. The problem is: for some problem,I cannot use the opcode "if picked up" because it's a Bribe,and if anyone has ever picked up a single bribe the IF would return me every time YES,so the script f*cked up very soon. So,I must use another way: if the player is near the bribe (VERY close),I clear the wanted level. | Bribes clear wanted level automatically, no need to code anything in SCM.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Mister X  |
Posted: Wednesday, Aug 8 2012, 12:35
|
Square Civilian

Group: Members
Joined: Dec 25, 2007

|
| QUOTE (SilentPL @ Wednesday, Aug 8 2012, 11:49) | | QUOTE (Mister X @ Wednesday, Aug 8 2012, 11:11) | | I'm doing a script on some pickup. The problem is: for some problem,I cannot use the opcode "if picked up" because it's a Bribe,and if anyone has ever picked up a single bribe the IF would return me every time YES,so the script f*cked up very soon. So,I must use another way: if the player is near the bribe (VERY close),I clear the wanted level. |
Bribes clear wanted level automatically, no need to code anything in SCM. | Yup,I know. But that bribe delete ALL wanted stars at once. So I must code that. Work on foot,doesn't work (obliviously,opcode 80F6 work only on foot) on car.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Mister X  |
Posted: Wednesday, Aug 8 2012, 13:40
|
Square Civilian

Group: Members
Joined: Dec 25, 2007

|
| QUOTE (JACK JONES @ Wednesday, Aug 8 2012, 12:47) | Did you try this:
| CODE | {$CLEO .cs} thread 'Jack'
:0 wait 250 if 0256: player $PLAYER_CHAR defined jf @0 0213: 0@ = create_pickup -4 type 15 at X Y Z // define this coord
:1 wait 0 if 0214: pickup 0@ picked_up jf @1 010D: set_player $PLAYER_CHAR wanted_level_to 6 05DC: end_custom_thread | |
Yup First thing I tried. But it suffer a "strange" problem: after some test,I discovered that if the player has ever picked up at least one bribe (even the original ones in city) the | CODE | | 0214: pickup 0@ picked_up |
return every time YES. This happen ONLY with bribe: some custom pickup and other kind works well. In fact,with other pickup I only use,simply,the 0214 opcode. So doesn't work...I've done "that" trick (posted previously) and works good,but it doesn't work if I drive onto it with vehicle like normal bribe because | CODE | | 80F6: not player $PLAYER_CHAR 0 -1093.1843 -711.0524 11.7914 radius 2.0 2.0 2.0 |
refer to a "on foot" player. I must find an opcode that work even on a car.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Link2012  |
Posted: Thursday, Aug 9 2012, 02:29
|
Wut?

Group: Members
Joined: Jan 30, 2011


|
| QUOTE (Ify24 @ Wednesday, Aug 8 2012, 16:59) | | QUOTE (Link2012 @ Wednesday, Aug 8 2012, 18:13) | | This is not a ID at all, It's a reference to a ID, it can vary from main to main, it's best to check in the IDE files. |
Yeah, but it's fine to use to creat a object. That's why I needed it | Will be same thing, will vary on each main, if you put -1 in the create_object and the user has a stripped main without any model reference, I don't know the behaviour of your script, but for sure will not create the object that you want.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(12) « First ... 4 5 [6] 7 8 ... Last »
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|