Page 2 of 2
Posted: Sun May 10, 2009 6:33 am
by Aprop
Good job... but there are two problems, first player sometimes stuck in wal as rookie said, second:
Code: Select all
^~^~^ Can't find textures/general_industrial/deckgrate_set1b.tga
unknown command: dmbulletcount
local.weap dmbulletcount 0 (global/portal.scr, 204)
local.weap ^
unknown command: dmammorequired
local.weap dmammorequired 0 (global/portal.scr, 205)
local.weap ^
Im using breaktrought..
Posted: Sun May 10, 2009 8:43 am
by $oldier Of Ra
That's because breakthrough's commands go like this:
Posted: Sun May 10, 2009 9:33 pm
by Rookie One.pl
As I said, I won't be fixing any of these things, I'm fine with them as I only created this mod to play it with my friends. You want to try to fix it, go ahead.
SoR is right about the commands. A simple check for getcvar(shortversion) should do the trick. If you feel like it, go for it.
Posted: Mon May 11, 2009 3:15 pm
by $oldier Of Ra
Your mod is amazing, rookie, just like in the real portal game. Cheers

Posted: Mon May 11, 2009 9:44 pm
by Rookie One.pl
Well, glad you like it.

Portal gun
Posted: Mon May 18, 2009 5:50 am
by Wierdo
Hey, never thought anybody would run with this. Great job Rookie One!!! I took a look at your work in the script. Wow; just wow. That is some really complicated math you know there. And the way you did it will allow it to work on any map, with a single line added to the script. I tested the conservation of momentium, and it will work for getting to places that would otherwise be too high.
Hey, 211476, if you are making a model, lemme know. I added in the launcher sound effects from the game. (In the copy I downloaded to my desktop.)
I think I will see about mapping some test chambers to play with this in. Companion cube time!
I will now see about making that material which cannot be teleported to. I will try something like isTouching and go from there.
Posted: Mon May 18, 2009 9:11 am
by Rookie One.pl
The most complex part of it is probably the portal matrix.

Plus a triangle normal calculation and some trigonometry. I wouldn't call that complex math.
I had this wacky idea of writing a BSP preprocessor to extract collision information to a script and perform traces via script, using the game engine for tracing against entities only. This way we could get all the information we may possibly want. I'm not sure it's worth it, though. The size of such a script file could span several megabytes, so it may be problematic for the scripting engine, too.
Math and storyline adheriance
Posted: Tue May 19, 2009 2:13 am
by Wierdo
The most complex part of it is probably the portal matrix. Plus a triangle normal calculation and some trigonometry. I wouldn't call that complex math.
Uhuh . . . I guess if that is just everyday math, then oh well. It is still on the very outskirts of my mathematical understanding. Maybe its the water we Americans drink. Infact, only careful study of your code and adjacent footnotes gave me the ability to decifer it. Well, that and perhaps the convenient targetnames.
Note: Portals can be fired through Vehicle clip, Player clip, Weapon clip and any material labeled "$name notsolid".
Now, you speak of a BSP preprocessor. Inherently cool, but I have a few Ideas. In the Portal game, the Portals would spawn on any surface except the black metallic walls. It could be that the device would have preformed in the same manner outside of the lab. Perhaps it was only that black stuff which blocked portal spawning. A "Super" material.
To best replicate its effect, I think the script only need recognize that a portal is touching this stuff, (script_object) and to immediately close it. Something like this could be called after each shot:
Code: Select all
on_blackstuff:
if (self.prtl_blue isTouching $blackwall)
self.prtl_blue waitthread portal_close 0
if (self.prtl_yellow isTouching $blackwall)
self.prtl_yellow waitthread portal_close 0
end
I am going to see if I can check for useheld. It should be better to press "E" and be able to collapse portals. Say, if you are being chased.
According to the game's AI, the device has a value greater than the organs and incomes of all subjects in "unknown amount". Is it possible to spawn it with a count of one, (prtl.gun cnt 1?) so as to make it a rare non-respawning item?
Posted: Tue May 19, 2009 2:38 am
by 211476
I still have the portal gun model that I made,
I'll begin texturing it and then I'll bone it:D and put it in game to replace the silenced pistol
I might even use Valve's texture

Portal - despawning
Posted: Tue May 19, 2009 7:49 am
by Wierdo
K, figured out how to despawn portals with the "E" key. Also figured out how to limit Portal gun to one per level,
without getting overflow in console from the animation thread.
211476, (Rookie, if still interested); If you guys are interested in polishing this up some more, I think we should work together on a second release of this file.
Also, Patch mesh "false ceilings" should allow portal spawning on them, but allow players to slide through them.
Posted: Tue May 19, 2009 10:39 pm
by Rookie One.pl
Well, that's everyday math for me ever since I got into modding.

But truth to be told, they didn't teach me that at school, even though they should (from what I'm told, universities do expect peeps to know matrix math and quite advanced analytic geometry). If you understood anything from the comments, that's already a success for me - code readability and commentary have always been my weak spots.
Yeah, I hate the way the portals look on uneven surfaces or when created from extreme angles, so I guess you can count me in on the BSP preprocessor and tracing end. With that, we could obtain hit surfaces' properties a.k.a. surface flags and contents (in general, the stuff you can set in Radiant's surface inspector or in shaders with the surfaceparm keyword). This way we could just filter metallic surfaces off, as well as the skybox and all the clips.
isTouching
Posted: Sun Jun 07, 2009 7:49 pm
by Wierdo
Tried to make portals close on contact with the black metallic wall stuff with isTouching. Could not get it to work at all. If a portal lands in any area between two black walls, it will close. When The walls are seperated into individual entities, and placed into an array, MOHAA will ignore the whole lot of them.
Unless only one surface in the game is considered to be unteleportable to, the game will not work correctly with isTouching.
Is there some other command I could use?

Posted: Thu Jun 11, 2009 4:17 pm
by Herr Klugscheisser
Portal of Honor
I'm having a lot of fun with this mod. Superb comes to mind. Great work ... thanks.

Posted: Fri Jun 19, 2009 5:31 am
by Aprop
Wierdo, maybe sightrace command may help you a bit?
Posted: Fri Jun 19, 2009 9:39 pm
by Rookie One.pl
I already have a solution. Just give me a while to polish it.