Please or Register to create posts and topics.

Creating my own cube dropper

So, for my next map I'm aiming at being able to create my own cube dropper instance. So far I've managed to get the cube to drop out of the cube dropper, the proper animations, skin changes and when I trigger it again the cube dissolves and spawns a new one.

The problem is that when the instance is triggered both of the cubes dissolve, the one outside the dropper and the one inside the dropper, waiting to be dispatched. I believe this happens because the two cubes are not separated. How can I separate the two cubes so the one outside the dropper dissolves but not the one inside? Thanks in advance!

They probably have the same name. You'll want to give them different targetnames (look at the spawnflags of your point_template).

Falsi sumus crusto!

The way the PTI droppers do this (and probably other Valve droppers) is with the AddOutput input. It's very powerful, and allows you to add new outputs to an item. The way it's done is to have a trigger below the dropper, filtered to the cube name (so cubes from other droppers won't trigger it); this dropper OnEndTouch sends an AddOutput command to the !activator (the cube which just dropped) with a paramarter of "OnUser1 !self:Dissolve::0:-1". This lets you FireUser1 on the cubes, and only the cube outside the dropper will trigger itself to Dissolve. You might also want some other logic to make sure that this dissolve input (.which will fire the OnDissolved output) won't trigger the dropper to respawn again and make an infinite loop.

AddOutput parameters have the syntax "output target:input:parameters:delay:number of times to fire". Number of times is basically the same as the "only once" checkbox, where 1=once, -1=infinite times, but the actual value in the vmf syntax allows other numbers so an output can be triggered twice for example before deleting itself.

If you want an example, open the instances/p2editor/item_dropper.vmf and find the cube_dropper_box, and see the inputs tab to find the AddOutput command that's used.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]

A much simpler way to do this is to have the next cube not spawn untill 0.01 delay after the first one has fizzled. this is how the droppers in my mod work. the only problem here is that, unlike valve droppers, there will not be a cube sitting in the dropper. this works better for maps where the cube can be seen going through the tubes beforehand or on fully custom dropper styles. I fixed the problem in my dropper design by having the openings of different cube type droppers look different so the player still knows what type of dropper it is; although i have no screenshots due to not being implemented in actual maps yet.

ImageImage
===========================
Im blue, a Clean Christian Furry with Autism.

Thanks guys (and sorry for the late reply)!

@TeamSpen210, thanks to your help it now works! I didn't really understand how the AddOutput, OnUser and FireUser worked, and I'm still trying to understand the mechanics but I guess it'll come eventually. I'll keep on working with the cube dropper but I believe the basics are covered. Thanks again!

@tile, thanks, I tried that method but I do want a cube inside the dropper while one is out.