Please or Register to create posts and topics.

New Game Element - Sphere Cannon

This is a new game element named 'sphere cannon', which works for
SP and COOP maps and can be used in PTI Editor and Hammer Editor.

Features:
- movement synchron to portalgun
- sounds and reload animations
- left mouse button to fire a (blue) sphere
- right mouse button for a transparent red crosshair
- you can pick it up and drop it whenever you want to
- 100% compatible with PTI Editor

I have included a ReadMe.txt with instructions for "how to install"
for the PTI Editor... step by step. So everyone can use this cannon
in their PTI Maps.

There are also 4 SP Showcase Maps with medium puzzles in the download
section, where you can see how I would suggest to use the cannon.

File Name: Sphere_Cannon_v05b_2.rar
File Size: 131.13 KiB
Click here to download New Game Element - Sphere Cannon

[back on TWP since 08. July 2017]
Steam: DrFauli

Showcase Maps Download:
New Game Element - Sphere Cannon (4 Maps)

Big thanks goes out to FelixGriffin for creating the ingame model for the PTI Editor.

Image

Trailer:
http://youtu.be/ygFEfYPHGQo

COOP testing and fun:
http://youtu.be/0mMtnTpVGrc

how does the crosshair work?

Spoiler
Hey guys, I figured I should explain the crosshair a little bit,
since nobody seemed to understand it on their own... :lol:

The yellow markers on the left and on the right are the markers for the distance.
You can estimate the distance when you use a tile of the wall-texture.

The yellow dot in the middle is the spot where the sphere will hit the wall.

---
First line (on top) is for everything that is right in front of you.
As long as the target wall-tile is bigger than the distance between the lines, you will hit it.

Image

A few more steps away from the wall, and you have to use one of the next lines.

Image

... and this time we are really far away and have to use the last line:

Image

And this is how it looks for a wall-mounted button:

Image

Code for editoritems.txt: (this is also included in the ReadMe.txt!)
Open and edit the file:
"C:program files (x86)steamsteamappscommonPortal 2portal2_dlc2scriptseditoritems.txt"

Now go to the end of the file and copy&paste the following text in FRONT of the last " } "
(there are several " } " at the end, but my text has to be in front of the last one only!)

Code: Select all
// ### sphere cannon / Ball Kanone

    "Item"
    {
        "Type"                 "ITEM_SPHERE_CANNON"
        "Editor"
        {
            "SubType"
            {   
                "Name"                "Sphere Cannon"
      "Model"
      {
         "ModelName"      "cannon.3ds"
         "TextureName"      "cannon.png"
      }
                "Palette"
                {
                    "Tooltip"            "Sphere Cannon"
                    "Image"               "palette/cannon.png"
                    "Position"            "3 1 0"               // 2. Zeile, 4. Reihe (line 2, row 4)
                }
                "Sounds"
                {
                    "SOUND_CREATED"            "P2Editor.PlaceOther"
                    "SOUND_EDITING_ACTIVATE"   "P2Editor.ExpandOther"
                    "SOUND_EDITING_DEACTIVATE" "P2Editor.CollapseOther"
                    "SOUND_DELETED"            "P2Editor.RemoveOther"
                }
            }   
            "MovementHandle"          "HANDLE_4_DIRECTIONS"
       "InvalidSurface"         "CEILING WALL"
            "OccupiesVoxel"           "0"
        }
        "Exporting"
        {
            "Instances"
            {
                "0"
                {
                    "Name"               "instances/p2editor/sphere_cannon.vmf"
                    "EntityCount"          "18"
                    "BrushCount"           "16"
                    "BrushSideCount"       "96"
                }
            }
            "Offset"                  "64 64 64"
            "TargetName"              "sphere_cannon"
            "OccupiedVoxels"
            {
                "Voxel"                     // Cannon
                {
                    "Pos"                  "0 0 0"
                    "CollideType"          "COLLIDE_SOLID"
                    "CollideAgainst"       "COLLIDE_SOLID"

                    "Surface"
                    {
                        "Normal"          "0 0 1"
                    }
                }
                "Voxel"                     // Button
                {
                    "Pos"                     "1 0 0"
                    "CollideType"          "COLLIDE_SOLID"
                    "CollideAgainst"       "COLLIDE_SOLID"

                    "Surface"
                    {
                        "Normal"          "0 0 1"
                    }
                }
            }
        }
    }

// ### end: sphere cannon / Ball Kanone ###

[back on TWP since 08. July 2017]
Steam: DrFauli

Yay! you finished making it!

Put this in scripts/science/cannon.test to use in the FGEMOD.

Code: Select all
PortalCombat's Sphere Cannon
Launches Edgeless Safety Cubes.

    "Item"
    {
        "Type"                 "ITEM_SPHERE_CANNON"
        "Editor"
        {
            "SubType"
            {   
                "Name"                "Sphere Cannon"
      "Model"
      {
         "ModelName"      "cannon.3ds"
         "TextureName"      "cannon.png"
      }
                "Palette"
                {
                    "Tooltip"            "Sphere Cannon"
                    "Image"               "palette/cannon.png"
                    "Position"            "$P"
                }
                "Sounds"
                {
                    "SOUND_CREATED"            "P2Editor.PlaceOther"
                    "SOUND_EDITING_ACTIVATE"   "P2Editor.ExpandOther"
                    "SOUND_EDITING_DEACTIVATE" "P2Editor.CollapseOther"
                    "SOUND_DELETED"            "P2Editor.RemoveOther"
                }
            }   
            "MovementHandle"          "HANDLE_4_DIRECTIONS"
       "InvalidSurface"         "CEILING WALL"
            "OccupiesVoxel"           "0"
        }
        "Exporting"
        {
            "Instances"
            {
                "0"
                {
                    "Name"               "instances/p2editor/sphere_cannon.vmf"
                    "EntityCount"          "18"
                    "BrushCount"           "16"
                    "BrushSideCount"       "96"
                }
            }
            "Offset"                  "64 64 64"
            "TargetName"              "sphere_cannon"
            "OccupiedVoxels"
            {
                "Voxel"                     // Cannon
                {
                    "Pos"                  "0 0 0"
                    "CollideType"          "COLLIDE_SOLID"
                    "CollideAgainst"       "COLLIDE_SOLID"

                    "Surface"
                    {
                        "Normal"          "0 0 1"
                    }
                }
                "Voxel"                     // Button
                {
                    "Pos"                     "1 0 0"
                    "CollideType"          "COLLIDE_SOLID"
                    "CollideAgainst"       "COLLIDE_SOLID"

                    "Surface"
                    {
                        "Normal"          "0 0 1"
                    }
                }
            }
        }
    }

Falsi sumus crusto!
PortalCombat wrote:
Showcase Maps Download:

Image

What is that cracked glass?
Actually, since I see both BEEMOD elements and HMW-Mod elements, is this some beta of the BEE2?

Test Subject #54067 wrote:
What is that cracked glass?
Actually, since I see both BEEMOD elements and HMW-Mod elements, is this some beta of the BEE2?

I just use the 'cracked glass' texture for my fixed grate coop instances,
since the grates do not work properly in coop maps, I had to create my own.

The glass texture comes from FGE Mod by Felix Griffin and he also created breakable glass,
which I personally dont need - but the texture was usefull... :p

The Items in my Editor can be found in the FGE Mod (which also includes BEE and HMW) but I edited
most of them to fit my needs. I started editing the editoritems.txt before I knew about FGE Mod/BEE.

[back on TWP since 08. July 2017]
Steam: DrFauli

I'm sorry for the criticism but I think that it is kinda unnatural that ball comes out if nowhere and how the cannon spawns out of nowhere. I suggest building more to it like adding effects ,particles and stuff like that. Also why is the ball blue not the normal color? A cool idea would be to add custom textures! :D I can tell that this is going to be a great testing element it just needs a little work :D well thanks for listening to me sorry if this sounded rude. Bye!

Feeling AWESOME!!!!
kai13XD wrote:
I'm sorry for the criticism but I think that it is kinda unnatural that ball comes out if nowhere and how the cannon spawns out of nowhere. I suggest building more to it like adding effects ,particles and stuff like that. Also why is the ball blue not the normal color? A cool idea would be to add custom textures! :D I can tell that this is going to be a great testing element it just needs a little work :D well thanks for listening to me sorry if this sounded rude. Bye!

Short answer: Because I lack all of these skills. :lol:

Long answer: The sphere cannon was just one my crazy ideas and the goal in creating it was
just to have some fun and see how it would work out. I had some ideas for it as a new game element,
before I started working on it, and after I got it ready, I had to use them in some maps aswell. :)

I know the cannon has some "realism" issuses or at least it is not like the other Portal Items,
but it would be really annoying if the sphere would actually be in the cannon all the time.
... to add even more realism, it should have to be reloaded with a sphere (which would break the use of it).

About the color: I just wanted to make clear, that it is a special sphere, which can not be picked up
and to prevent confusing, I colored it. ... and ofcourse I like the blue color look. :lol:

Speaking for myself: I am not gonna add anything new to the cannon.
I published all my files and if someone really wants to add animations and particles, he is
free to do so and can edit everything he wants. You could also try to spawn it out of a dropper.

Thanks for your feedback, sorry I cant improve it... but I just dont have these skills. ^^

[back on TWP since 08. July 2017]
Steam: DrFauli

I can show you how to hex a model and make particles if you want, but I'm working on my own test elements at the same time. I think you should continue working on this though, it could be a lot better with just a few simple changes. Particles have an amazing effect on test elements.

Falsi sumus crusto!
PortalCombat wrote:
kai13XD wrote:
I'm sorry for the criticism but I think that it is kinda unnatural that ball comes out if nowhere and how the cannon spawns out of nowhere. I suggest building more to it like adding effects ,particles and stuff like that. Also why is the ball blue not the normal color? A cool idea would be to add custom textures! :D I can tell that this is going to be a great testing element it just needs a little work :D well thanks for listening to me sorry if this sounded rude. Bye!

Short answer: Because I lack all of these skills. :lol:

Long answer: The sphere cannon was just one my crazy ideas and the goal in creating it was
just to have some fun and see how it would work out. I had some ideas for it as a new game element,
before I started working on it, and after I got it ready, I had to use them in some maps aswell. :)

I know the cannon has some "realism" issuses or at least it is not like the other Portal Items,
but it would be really annoying if the sphere would actually be in the cannon all the time.
... to add even more realism, it should have to be reloaded with a sphere (which would break the use of it).

About the color: I just wanted to make clear, that it is a special sphere, which can not be picked up
and to prevent confusing, I colored it. ... and ofcourse I like the blue color look. :lol:

Speaking for myself: I am not gonna add anything new to the cannon.
I published all my files and if someone really wants to add animations and particles, he is
free to do so and can edit everything he wants. You could also try to spawn it out of a dropper.

Thanks for your feedback, sorry I cant improve it... but I just dont have these skills. ^^

I see, well thanks anyways. I hope u do improve upon it :D

Feeling AWESOME!!!!