drarem
Members-
Posts
234 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Everything posted by drarem
-
Dropping the range made the difference, thank you.
-
tried adding listener back, am using another mono sample. This is in the start function, but should it get moved to where the entity is instead of at 0,0,0 ? Thanks. --Create a listener local listener = Listener:Create() listener:SetPosition(0,0,0)
-
I tried creating a local listener for the self releasing object in the Start() function as in the API example showed, didn't seem to help
-
I set up the source sound looking at the api, i know my audio is a mono (1 track), but when it plays, it doesn't sound like it's in the distance on the more distant ones. Am i missing something else? Thanks. Start: self.sound={} self.sound.glassbreak=Sound:Load(self.glassbreak) --Create a self.source self.source = Source:Create() self.source:SetSound(self.sound.glassbreak) self.sound.glassbreak:Release() self.source:SetLoopMode(false) self.source:SetRange(60.0) end -- play this audio once when the glass breaks self.source:SetPosition(self.entity:GetPosition()) self.source:Play() self.entity:SetMass(0) self.entity:SetCollisionType(0) self.entity:Release()
-
Ok I found this, but the documenation I think lies if i read it right.. loop=false doesn't let it keep playing. once the entity is released, the sound doesn't get a chance to play. It is killed with the entity. self.entity:EmitSound(self.sound.glassbreak, 40, 1, 1, false)
-
Ok, only mono sounds can be played using 3d spatialization. are there any examples for it, or is it automatic as long as the sound is mono format?
-
I found this, it works well. http://www.leadwerks.com/werkspace/topic/13485-font-sizes/page__hl__resolution
-
for multiple resolutions, is there an easy way to handle HUD text and output, or does it require calculations for each mode possible? Thanks.
-
Many thanks, after thinking about the 'fx and fy' variables and some testing, I realized those were a string value instead of numeric. I converted them to a number using tonumber(fx) and tonumber(fy), and it works as expected.
-
It's odd, that's what I have but when I access it in another function (after it has been initialized and called), then crashes with a 'nil' like it has gone out of scope. BUT if I hardcode the numbers, it works. myarray[fx][fy] = 0 -- nil error myarray[3][1] = 0 -- works
-
After I've initialized the array using a function, I can do this: globals.myarray[1][1] = 0 and it works, but if I do this: local fx=globals.reti local fy=globals.retj System:Print(...) .. fx, fy are now equal to 1,1 This won't work: globals.myarray[fx][fy] = 0 I get this error: 253 : attempt to index a nil value What is going on? thanks
-
thanks, the drawrect works great
-
What's an easy way to get the entire screen to fade to white or fade to black? Thanks.
-
I used a different simple model as a trigger, it's working now.
-
The main thing is, my trigger isn't triggering but it's a child of the main object.
-
Yes, it's set as Rigid Body / Trigger under the Physics tab, with script of CollisionTrigger.lua in the script tab. I set up the flowgraph, then i right click, save as prefab. Then I deleted the object on the editor and it's loaded at runtime. I brought it back in from the prefab folder, nothing is showing up in the flowgraph editor when i select the objects.
-
Be able to activate an object without having to touch it directly. Like at a distance.
-
Even then it only triggers if i'm moving within the trigger zone, if I stand still there is no continual triggering event. What am I missing? Thanks.
-
On my own function, using the flowgraph i see a plain line, where when i connect to the Collision() script I see the 'marching' dots along the line, if that makes sense. It gets triggered in the Collision() function of the elevator script, even though I change it to calloutputs("Collidex").. somehow it still triggers in the Collision() function. Trigger script: function Script:Collision(entity, position, normal, speed) if self.enabled then self.component:CallOutputs("Collision") end end elevator script: function Script:Collidex()--in System:Print("Triggered here.!.") end function Script:Collision(entity, position, normal, speed)--in if (self.window==nil) then self:Start() end System:Print("Triggered in collision function..!.") if self.window:KeyDown(Key.E) then self.entity:Move(0, 0, -0.001) entity:SetGravityMode(false) else entity:SetGravityMode(true) end end
-
So I must use the flowgraph editor to handle a trigger? The trigger is a child of the box, but it doesn't fire off when i enter the trigger zone as a collision(). function Script:Collision(entity, position, normal, speed) if (entity:GetKeyValue("type") == "player") then System:Print("In the trigger zone") trigzone = true else System:Print("Outside the trigger zone") trigzone = false end end
-
Hi, I have a basic model, the inside of a box like an elevator you can walk into. I find I have to keep pushing against the wall of the box to register a collision. How or what would I do to increase the range of the collision so I don't have to be pushing against it? In other words, if I walk into the box the collision is registering. Thanks.
-
Does it work for prefabs? I have this code and it works for the model on the map, but I saved as a prefab and spawn it it also, it doesn't display any message or open. function Script:Collide()--in if self.animationmanager==nil then self:Start() end System:Print(">>> And this collision is called in turn..") if self.opened == false then self.animationmanager:SetAnimationSequence("Open",0.04,150,self,self.EndOpen) self.opened = true end end
-
I'm at the point where I think I need to use a flowgraph. I have an invisible trigger box parented to an animated treasure chest. When I run into the trigger I want the animation of the chest to play (by opening).. I added the CollisionTrigger.lua to the box, added to flowgraph and i see three functions in the flowgraph. So far it looks good. For the animated box, i have a script to open/close the box, but when i move it to the flowgraph, it has no functions. How would I set it up to receive the input, to trigger the animation? thanks.
-
I think in the steam account you set up a number of hard coded 'achievements'.. then you do a SetAchievement('hard coded achievement'), to set it to true to make the achievement 100%. For the increment, dont see how that works yet, but i'm guessing you can go from 0 to 100% for a certain achievement such as number of kills or what not.