Reflector Sphere?
Naulziator wrote:
Has anyone tried this idea? If so, where can I find one?
What for? maybe to make it roll redirecting the laser to different laser_catchers placed in different locations but aligned in a row?
.. Ha, no, I guess it would be more interesting that you can simply get a wider range of angles to redirect the laser from a given position or when settled in the ball_button
I think it could be difficult to create without scripting. But definitely interesting ![]()
I can create the pedestal & ball in Blender if someone else can help me with the coding.
FelixGriffin wrote:
If you add the proper attachments to the sphere model it's fairly straightforward to SetModel a laser cube to it.
That simple? hmmmm... sounds very interesting, deserves a try! ![]()
taco wrote:
If the idea is putting two words beside each other and then not explaining what you are talking about, then yes - many people have tried that before.
You don't have to be nasty about it. The OP was perhaps a bit sparse on words, but it was obviously enough for other people to understand what Naulziator was getting at. You could be more kind with your criticisms in the future. At the very least, you could have asked for clarification.
Judging from all that coding, I think I'll stick to just the model and texture design for now. Work and PS3 need to have a fair balance for me at this time.
Magnet spheres would be interesting, there's actually a prop entity called phys_magnet that's almost never used in Source.
FelixGriffin wrote:
Magnet spheres would be interesting, there's actually a prop entity called phys_magnet that's almost never used in Source.
https://developer.valvesoftware.com/wiki/Phys_magnet
Oh, now THAT is encouraging. It does exactly what I've been wanting to do with magnet boxes. I'll start working on the cube/sphere once our reflector sphere is ready.
I'd be weary of the warning posted at the top of the page. I'll need to experiment with a test model first.
Unfortunately this means there's no way to use a script to ent_create one since it will crash before the script can change its model.
EDIT: I'm going to be away for a week for spring break, but the script can be as simple as self.SetModel("models/YOUR_MODEL_PATH.mdl"); saved as scripts/vscripts/fg/reflector_sphere.nut (under portal2). Then place a prop_physics of the sphere in your map to load the model, and have a logic_auto make the cubes RunScriptFile fg/reflector_sphere.nut OnMapSpawn.
function ChangeCubes(){
Entities.FindByClassname(null, "prop_weighted_cube").SetModel("models/josepezdj/metal_box_jose.mdl");
}
Name it whatever.nut and place it somewhere under scripts/vscripts. You'll need a logic_auto as Felix said altogether with a logic_script entity (in it, you have to set the script name of your script, k?), and fire the output:
OnMapSpawn > [logic_script_name_here] > RunScriptCode > ChangeCubes()
BUT you'll also need to run the script everytime the prop_weighted_cube (with your spehere model) is fizzled, ok? So you'll also have to add the following output in your droppers's cubes:
OnFizzled > [logic_script_name_here] > RunScriptCode > ChangeCubes()
That way it should be working all the time. In the case you already have the sphere model and want me to give it a try taking the chance that I have already built the system, just let me know and send it to me, and if it works I'll post a test map here with the working system, ok? ![]()
Model's ready for action. Going to try the script stuff tomorrow.
gtest_sampe_010000.jpg gtest_sampe_010001.jpgThe magnet switch's going to be my next model, followed by a glass weight switch (like those bathroom glass scales). I've already sketched some fancy designs, and they won't be as much trouble with UV mapping as this model was.
Shoot! March Break is different here north of the border, isn't it? (CSI Fli-ami got it wrong, big time! As usual...)
Jose: if it's only for specific cubes in this case, a FindByClassnameNearest might be better. And if you do it to the template for the box dropper all the new ones it spawns will have their models changed.
FelixGriffin wrote:
*f you do it to the template for the box dropper all the new ones it spawns will have their models changed.
Wait, is it possible to still reach the original template entities? I always thought that all entities referred to by a template were removed from the 'active entities' list and put somewhere where the game doesn't interact with them.
(So that they don't get removed by an EntFire :Kill, for instance.)
Or do you change them before the template picks them up?
But the way I did it was to put the script in the Entity Scripts on the template, so it changes on spawn.