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

 Create a visible moving corona in distance

 
14600  
Posted: Saturday, Sep 8 2012, 18:44
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 15, 2011

XXXXX



Hello,

I want to create a visible moving corona at the sky that can be seen from very far distance. I’ve found a site with the corona memory structure and was able to create one static that is always visible and won’t disappear at range. The core problem is if I create one on a moving object far away, it’ll still disappear. mad.gif Can somebody help me make the corona always be visible at very far distance and also in motion?

http://gtag.gtagaming.com/sanandreas/coronas.php
http://www.gtaforums.com/index.php?showtopic=453473

CODE

:1_11
wait 0
if
0AB0:   key_pressed 122
jf @1_11
jump @1_13

:1_13
wait 0
04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
04D5: create_corona_at 11@ 12@ 13@ radius 5.0 type 1 flare 2 RGB 255 0 0
for 25@ = 0xC3E058 to 0xC3EF58 step 0x3C
  0A8D: 26@ = read_memory 25@ size 4 virtual_protect 0
  if
      0045:   26@ == 11@ // (float)
  then
      break
  end
end
25@ += 0x1C
0A8C: write_memory 25@ size 4 value 5000000.0 virtual_protect 0
for 27@ = 0xC3E058 to 0xC3EF58 step 0x3C
  0A8D: 28@ = read_memory 27@ size 4 virtual_protect 0
  if
      0045:   28@ == 11@ // (float)
  then
      break
  end
end
27@ += 0x31
0A8C: write_memory 27@ size 4 value 255 virtual_protect 0
jump @1_13


This post has been edited by 14600 on Saturday, Sep 8 2012, 19:19
PM
  Top
 

 
HeresOtis  
Posted: Saturday, Sep 8 2012, 20:02
Quote Post


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

XXXXX



I believe that the corona structs only work for static coronas. Your corona isn't created in world coordinates so
CODE
if
     0045:   26@ == 11@ // (float)
 then
will always return false.
What you can do is get the radius, type, flare, and RGB of the corona struct and check if they match the same as values in your created corona.
Or you can download DK22Pac's NewOpcodes (http://www.gtaforums.com/index.php?showtopic=518780) and use this opcode:
CODE
0D54: draw_corona_with_extra_params_texture CORONASTAR color 255 255 255 255 on_entity 0 at 0@ 1@ 2@ size 0.5 far_clip 150.0 near_clip 1.5 flare 0 enable_reflection 1 check_obstacles 0 flash_while_fading 0 fade_speed 15.0 only_from_below 0


Someone correct me if I've given incorrect information.
PM
  Top
 

 
Deji  
Posted: Saturday, Sep 8 2012, 20:27
Quote Post


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

ja.gif

XXXXX



Seems to work fine... You're even using the correct corona opcode ([opcode]04D5[/opcode] == DRAW_MOVING_CORONA).

user posted image

Displayed all good with me speeding in a cheetah with cinematic mode on.
Users WebsitePM
  Top
 

 
14600  
Posted: Saturday, Sep 8 2012, 23:38
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 15, 2011

XXXXX



QUOTE (HeresOtis @ Saturday, Sep 8 2012, 20:02)
I believe that the corona structs only work for static coronas. Your corona isn't created in world coordinates so
CODE
if
     0045:   26@ == 11@ // (float)
 then
will always return false.
What you can do is get the radius, type, flare, and RGB of the corona struct and check if they match the same as values in your created corona.
Or you can download DK22Pac's NewOpcodes (http://www.gtaforums.com/index.php?showtopic=518780) and use this opcode:
CODE
0D54: draw_corona_with_extra_params_texture CORONASTAR color 255 255 255 255 on_entity 0 at 0@ 1@ 2@ size 0.5 far_clip 150.0 near_clip 1.5 flare 0 enable_reflection 1 check_obstacles 0 flash_while_fading 0 fade_speed 15.0 only_from_below 0


Someone correct me if I've given incorrect information.

Thank you. The “DK22Pac's NewOpcodes“ Pack with the “0D54:” Opcode is the solution for this problem. smile.gif
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