1 registered members (Ayumi),
900
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
***COOL CAMERA PROJECT HERE!*** Help me build one!
#53610
08/29/05 22:53
08/29/05 22:53
|
Joined: Aug 2005
Posts: 107
NMS
OP
Member
|
OP
Member
Joined: Aug 2005
Posts: 107
|
Hi, i'm making a camera that dont run away from blocks, just decrease their alpha to 50%.
This is the code i'm using, but i dont think the trace is well doned. any help is apreciated, then i may share the perfect code here for users to use it!
code:-------------
vec_set(temporario,camera.x); //copy camera xyz to temporario distanciaaoplayer = vec_dist(camera.x,my.x); //see the distance between the camera and the player and stores it in distanciaaoplayer trace_mode = ignore_passable + ignore_me; //traces a ray from the camera to the player and see if he hits on non passable block while (trace(temporario,distanciaaoplayer) !=0) {you.alpha=50;} // if the ray hits a block, that block must turn transparent
------------------ -------------------------------
Last edited by NMS; 08/30/05 09:35.
|
|
|
Re: ***COOL CAMERA PROJECT HERE!*** Help me build one!
[Re: NMS]
#53611
08/30/05 10:10
08/30/05 10:10
|
Joined: Jan 2004
Posts: 3,023 The Netherlands
Helghast
Expert
|
Expert
Joined: Jan 2004
Posts: 3,023
The Netherlands
|
if a trace hits a wall, it returns null, and you cant set a null object with flags... only way i think to do this is by a dll, which makes blocks data readable from the .wmb file (for fun open up notepad and load your .wmp or .wmb file in there, you'll see each blocks data type) then set flags or something according to that. i dont know any more about this though, i wish you good luck, and regards.
PS: you could render everything as "parts", and use it as map entity to make them transparent, that would work.
|
|
|
Re: ***COOL CAMERA PROJECT HERE!*** Help me build
[Re: NMS]
#53615
08/30/05 10:37
08/30/05 10:37
|
Joined: Jan 2004
Posts: 3,023 The Netherlands
Helghast
Expert
|
Expert
Joined: Jan 2004
Posts: 3,023
The Netherlands
|
yeah, that's the structural data i was talking about, maybe by dll you could access that EDIT: that's what i said, the empty pointer is the null in the walls.. dont think it can be accessed by c-script, maybe anyone else knows. good luck on it. regards,
Last edited by dennis_fantasy; 08/30/05 10:39.
|
|
|
Re: ***COOL CAMERA PROJECT HERE!*** Help me build
[Re: NMS]
#53619
04/14/07 18:20
04/14/07 18:20
|
Joined: Apr 2007
Posts: 67
suriname0
Junior Member
|
Junior Member
Joined: Apr 2007
Posts: 67
|
Couldn't you use c_Scan? I don't know much about it, but you could use it to detect the blocks from a distance. Then you could use the "you" parameter to change whatever you want, as long as they are entities or models.
If I am posting, it probably means I am asking a question. Or faking my knowledge by agreeing with somebody else.
|
|
|
|