Difference between revisions of "Talk:Creating a rotating portalgun"

From Valve Developer Community
Jump to: navigation, search
(Rotating portalgun in P2: new section)
m (Rotating portalgun in P2: the solution)
Line 50: Line 50:
 
I`d tried many different ways to solve this problem and now I`m thinking that is a bug or result of some kind of delay in game system. It would be great if you prove me wrong and note on my mistake (I can answer questions).
 
I`d tried many different ways to solve this problem and now I`m thinking that is a bug or result of some kind of delay in game system. It would be great if you prove me wrong and note on my mistake (I can answer questions).
 
'''[[user:StreetStrider|StreetStrider]]''' 08:42, 19 May 2011 (UTC)
 
'''[[user:StreetStrider|StreetStrider]]''' 08:42, 19 May 2011 (UTC)
 +
 +
: The solution have been finded. It covers in using of [[func_door_rotating]] as rotating entity instead of [[func_rotating]]. '''[[user:StreetStrider|StreetStrider]]''' 18:40, 31 May 2011 (UTC)

Revision as of 18:40, 31 May 2011

Could someone please try and have a go at this? I've tried and failed rather miserably; it's one of the portal guns on a rotating pedistal which rotates 90 degrees, shoots, and opens when you get close. Thanks ~ Kdapro 12:39, 22 Nov 2007 (PST)

Hey, could you write me an e-mail, and I'll send you back the decompiled Valve map for that level. --Baliame 12:49, 22 Nov 2007 (PST)
Hehe; I have the level, but I don't understand any of it - I firstly tried to copy it into my map but that didn't produce any productive results. And plus - I'd like to know how'd to build my own, if that's no trouble ~ Kdapro 13:05, 22 Nov 2007 (PST)
well buuilding your own is nothing we can helo you with, but there are guides around here on getting started.--Gear 21:30, 22 Nov 2007 (PST)
Give me about a day :) --Baliame 13:11, 22 Nov 2007 (PST)
Thanksgiving Day Wiki editing ftw! --Remmiz 13:23, 22 Nov 2007 (PST)
No thanksgiving in Hungary. --Baliame 13:24, 22 Nov 2007 (PST)
That works too! --Remmiz 13:32, 22 Nov 2007 (PST)
Hmmm... It might take longer than I thought. --Baliame 08:31, 23 Nov 2007 (PST)
This was a failure. I'm making a note here, epic fail; It's hard to surpress my sarcastic comments... Nah, I'm kidding =] --Kdapro 16:06, 28 Nov 2007 (PST)
HAHAHAHA!!!! Good one! Anyway, I cleaned up a whole lot of grammar messes. Otherwise, this tut looks pretty good! --Darthkillyou 14:47, 16 Jan 2008 (PST)

Rotating portalgun in P2

Good day, people. I have some problem with rotating portalgun in Portal 2. I`m in construct of intro level (in which player gets portalgun) now and i want my portalgun to rotate at 180 degrees and shoot portal at every step.

So I set something like this:

func_rotating:

name: rotor
speed: 30
friction (I have no idea what this parameter controls): I`ve set 0, 20 and 100; nothing changed.
flags: not solid

weapon_portalgun:

name: portalgun
parent: rotor
and it cannot fire portal 2 (orange)

So if the speed of rotating entity is 30 (degress per second), then the rotation in 180 degrees takes 6 seconds, right?

Then I create logic_timer: interval: 8

and it have such outputs:

rotor; Start; delay = 0
rotor; Stop; delay = 6
portalgun; FirePortal1; delay = 7

and after waiting for 1 second the cycle repeats.

But after one full rotation rotor (and portalgun) stops at wrong angle. You can see it on this in-game screenshots (I use env_beam to track real angle).

http://steamcommunity.com/id/streetstrider/screenshot/540642767565334803

http://steamcommunity.com/id/streetstrider/screenshot/540642767565339196

The beam must point at the exact center of panel, but after every rotation it runs at side more and more. I`d tried many different ways to solve this problem and now I`m thinking that is a bug or result of some kind of delay in game system. It would be great if you prove me wrong and note on my mistake (I can answer questions). StreetStrider 08:42, 19 May 2011 (UTC)

The solution have been finded. It covers in using of func_door_rotating as rotating entity instead of func_rotating. StreetStrider 18:40, 31 May 2011 (UTC)