Quantcast

Jump to content

» «
Photo

Changing Object properties ON THE FLY ?

6 replies to this topic
pep legal
  • pep legal

    Old but Gold

  • Members
  • Joined: 17 May 2008
  • Brazil

#1

Posted 30 August 2014 - 10:19 AM Edited by pep legal, 30 August 2014 - 10:22 AM.

Some doubts of a newbie...

 

 

Apart position and rotation...are there opcodes for changing some attributes of a model : Like scale (make it larger or smaller), transparency (vertex alpha), or even assign another texture ?

 

 

Thanks.


DK22Pac
  • DK22Pac

  • Feroci
  • Joined: 12 Apr 2009
  • Ukraine
  • Best WIP Mod 2014 [Grand Theft Auto 3D Contribution]
    Contribution Award [Mods]

#2

Posted 31 August 2014 - 03:26 AM Edited by _DK, 31 August 2014 - 03:26 AM.

08D2: object 347@(39@,10i) scale_model 0.3
And NO has an opcode for changing object's transparency.

MasterHK
  • MasterHK

    کیان حامی‏

  • Members
  • Joined: 20 Mar 2013
  • Iran

#3

Posted 01 September 2014 - 01:26 AM

@DK, in your own newOpcodes...


pep legal
  • pep legal

    Old but Gold

  • Members
  • Joined: 17 May 2008
  • Brazil

#4

Posted 01 September 2014 - 04:05 AM Edited by pep legal, 01 September 2014 - 04:29 AM.

08D2: object 347@(39@,10i) scale_model 0.3
And NO has an opcode for changing object's transparency.

 

 

 

 

Thank you for answering !

 

 

I'm kind of "doing" a dome model for putting some stars at night.

 

There are one or two star mods out there...I got the idea, but I didn't like the implementation of them.

 

So...I'm doing my "own" version of that...mostly for learning...and to let the SA sky a bit less boring at night, of course.

 

There are some few problems though....

 

The dome cannot be smaller or greater than Far Clip distance ( - oddness like seeing stars in front of buildings...or changing colors at the region which Far-clip Plane intersects the Dome)

 

I can use "sa_draw_distance_changer.asi" to take control of Far-clip Plane out from Timycyc...but I was thiking of changing the Dome size dynamically, getting Far-clip value inside the main Loop:

.

:LOOP
wait 100 
04C4: store_coords_to 15@ 16@ 17@ from_actor $PLAYER_ACTOR with_offset 0.0 1.0 1.0 
Actor.PutAt(6@, 15@, 16@, 17@)
069B: attach_object 1@ to_actor 6@ with_offset 2.0 0.0 0.0 rotation 0.0 0.0 0.0 
jump @LOOP 

.

 

 

But my scripting skill Sucks...so I appreciate tips like yours.

 

 

BTW...How can I get Far Clip distance inside a Cleo Script ??? :  :lol:

 

 

 

 

 

F4FGzmb.png?1

 

 

 

 

pqLc8Ii.jpg?1

  • Ezekiel and Nights744 like this

Ezekiel
  • Ezekiel

    Chief Remastered

  • Members
  • Joined: 11 Nov 2012
  • Sierra-Leone

#5

Posted 02 September 2014 - 09:21 AM

pep legal

 

you can edit distance of object in map editor easily-and your sky don't have collision mesh so it will work by just editing IDE (in map editor)

 

and that's a cool thing you make there


pep legal
  • pep legal

    Old but Gold

  • Members
  • Joined: 17 May 2008
  • Brazil

#6

Posted 02 September 2014 - 01:14 PM Edited by pep legal, 02 September 2014 - 01:58 PM.

pep legal

 

you can edit distance of object in map editor easily-and your sky don't have collision mesh so it will work by just editing IDE (in map editor)

 

and that's a cool thing you make there

 

 

Thanks for your attention...and No....this mod is very humble in its intention. But YOUR MOD is Great !    :santa:

 

...my problem is not the object distance. Actually the center (pivot) of the Dome is right on the player (all the time).

 

My problem is the size of it !

 

The "border" of the dome cannot be bigger than Far-Clip ( intersection has different brightness -> ugly )...or smaller (would cause stars in front of buildings/mountains). I need to "adjust" dome's size dinamically in order to get the "perfect" fitness for any weather condition (as you know...far-clip changes for diferent weathers).

 

Right now Im' Not having problems, because I'm keeping Far-Clip "unchangeable" using "sa_draw_distance_changer.asi"...from 2dfx project.

 

But I think of getting rid of that soon...and let far-clip "Free" (under control only of Timecyc).

 

I want to use this Dome during day time as well (now it's only for nights)...putting a better cloud system ( even with good textures, clouds in this game are ugly).

 

.

  • Ezekiel likes this

miclin
  • miclin

    old stager

  • Members
  • Joined: 22 Mar 2009
  • Germany

#7

Posted 02 September 2014 - 10:37 PM Edited by miclin, 02 September 2014 - 10:44 PM.

hmm maybe you build smth like this.:

 

1.store current weather to a var  (http://www.gtamoddin...)#Weather_Codes)

 

2. smth like this:

 
if 
   weath@==1
then
     08D2: object 347@(39@,10i) scale_model 0.3
end
if 
   weath@==2
then
    08D2: object 347@(39@,10i) scale_model 0.3
end
etc.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users