-
Posts
265 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Everything posted by ESP
-
Coronas and View distance (blinky radio tower beacons)
ESP replied to Flexman's topic in Programming
I.E.8 Robin -
Coronas and View distance (blinky radio tower beacons)
ESP replied to Flexman's topic in Programming
Notepad++ gives me... dofile("Scripts/base.lua")function InitDialog(grid) base_InitDialog(grid) --custom properties group=grid:AddGroup( "Beacon" ) group:AddProperty( "blinkspeed",PROPERTY_INTEGER,1000,"Blink Speed") group:AddProperty("beaconcolor",PROPERTY_COLOR,"","Beacon Color") group:Expand(1)endfunction Spawn(model) local entity=base_Spawn(model) entity.antennalight={} entity.blinkspeed = tonumber(model:GetKey("blinkspeed","1000")) entity.beaconcolor = Vec4(1.0,0,0,1) entity.lasttime = AppTime() entity.blinktoggle = 1 for i=0,2 do entity.antennalight[i] = CreateCorona(model) entity.antennalight[i]:Paint(LoadMaterial("abstract::flare1.mat"),1) entity.antennalight[i]:SetParent(model,0) entity.antennalight[i]:SetColor(entity.beaconcolor,0) SetCoronaRadius(entity.antennalight[i],1,1) EntityViewRange(entity.antennalight[i],800,1000) end -- Fixed light positions on our antenna entity.antennalight[0]:SetPosition(Vec3(0,35,0.1),0) entity.antennalight[1]:SetPosition(Vec3(1.5,25.2,0.1),0) entity.antennalight[2]:SetPosition(Vec3(-1.5,25.2,0.1),0) base_SetKey("collisiontype",COLLISION_PROP) --An update function for one instance. Declaring the function as part of the entity table allows us to use "self" for the table function entity:Update() if (AppTime()-self.lasttime>entity.blinkspeed) then self.lasttime = AppTime() self.blinktoggle = -self.blinktoggle if (self.blinktoggle>0) then self.antennalight[0]:Hide() else self.antennalight[0]:Show() end end endendfunction SetKey(model, key, value) local entity=entitytable[model] if entity==nil then return 1 end if entity.model==nil then return 1 end if key=="blinkspeed" then entity.blinkspeed = tonumber(value) elseif key=="beaconcolor" then entity.beaconcolor=StringToColor(value) entity.beaconcolor.w = 1 entity.antennalight[0]:SetColor(entity.beaconcolor,0) entity.antennalight[1]:SetColor(entity.beaconcolor,0) entity.antennalight[2]:SetColor(entity.beaconcolor,0) end return 1end--Update function, called during every UpdateWorld()function Update(world) if world==world_main then local model,entity for model,entity in pairs(entitytable) do if model.world==world then entity:Update() end end endend Nice looking editor though Robin -
Coronas and View distance (blinky radio tower beacons)
ESP replied to Flexman's topic in Programming
I get... dofile("Scripts/base.lua")function InitDialog(grid) base_InitDialog(grid) --custom properties group=grid:AddGroup( "Beacon" ) group:AddProperty( "blinkspeed",PROPERTY_INTEGER,1000,"Blink Speed") group:AddProperty("beaconcolor",PROPERTY_COLOR,"","Beacon Color") group:Expand(1)endfunction Spawn(model) local entity=base_Spawn(model) entity.antennalight={} entity.blinkspeed = tonumber(model:GetKey("blinkspeed","1000")) entity.beaconcolor = Vec4(1.0,0,0,1) entity.lasttime = AppTime() entity.blinktoggle = 1 for i=0,2 do entity.antennalight[i] = CreateCorona(model) entity.antennalight[i]:Paint(LoadMaterial("abstract::flare1.mat"),1) entity.antennalight[i]:SetParent(model,0) entity.antennalight[i]:SetColor(entity.beaconcolor,0) SetCoronaRadius(entity.antennalight[i],1,1) EntityViewRange(entity.antennalight[i],800,1000) end -- Fixed light positions on our antenna entity.antennalight[0]:SetPosition(Vec3(0,35,0.1),0) entity.antennalight[1]:SetPosition(Vec3(1.5,25.2,0.1),0) entity.antennalight[2]:SetPosition(Vec3(-1.5,25.2,0.1),0) base_SetKey("collisiontype",COLLISION_PROP) --An update function for one instance. Declaring the function as part of the entity table allows us to use "self" for the table function entity:Update() if (AppTime()-self.lasttime>entity.blinkspeed) then self.lasttime = AppTime() self.blinktoggle = -self.blinktoggle if (self.blinktoggle>0) then self.antennalight[0]:Hide() else self.antennalight[0]:Show() end end endendfunction SetKey(model, key, value) local entity=entitytable[model] if entity==nil then return 1 end if entity.model==nil then return 1 end if key=="blinkspeed" then entity.blinkspeed = tonumber(value) elseif key=="beaconcolor" then entity.beaconcolor=StringToColor(value) entity.beaconcolor.w = 1 entity.antennalight[0]:SetColor(entity.beaconcolor,0) entity.antennalight[1]:SetColor(entity.beaconcolor,0) entity.antennalight[2]:SetColor(entity.beaconcolor,0) end return 1end--Update function, called during every UpdateWorld()function Update(world) if world==world_main then local model,entity for model,entity in pairs(entitytable) do if model.world==world then entity:Update() end end endend Robin -
This is a fresh install of XP (with its 150+patches ) purely to run LE. Nothing else but Blitzmax installed The right mouse button still pans the camera... Robin
-
U suppose I just have to wait till Josh awakens Robin
-
Exactly the same. Robin
-
Downloading now. Robin
-
Hi, I can use paint, visibility and vegetation. I cannot sculpt, flatten or smooth. That applies to loaded 2.28 into 2.3 and created 2.3... Robin
-
Coronas and View distance (blinky radio tower beacons)
ESP replied to Flexman's topic in Programming
Cheers. A bit tortuous and we loose formatting, but at least I get the code. Robin -
Hi, I've updated my drivers but that makes no difference. On getting 2.3 I removed all traces of previous versions. I've just re-downloaded 2.28 and it works fine. I can load a 2.28 terrain into 2.3. I just can't sculpt it. Robin
-
Coronas and View distance (blinky radio tower beacons)
ESP replied to Flexman's topic in Programming
Hi, Did anyone work out how to cut and paste code from the forum? I just get one line no matter where I paste to... Robin -
"Dead people on the ground, flies buzzing around, slowly zoom out to medium distance, then quick turn to show guy up on hill overlooking the carnage. Take advantage of the god rays by having the sun directly behind him streaming around him" sounds good to me Robin
-
Worked in 2.28. Now nada Robin
-
It just does not work. The circles move around as I hold the left mouse button down. Just no 'sculpting'.... Robin
-
Nope, Nothing I do will change the terrain.... Robin
-
Hi, How come I cannot sculpt a terrain? Is there a secret key combination? I create a 128x128 terrain, Get a couple of circles in sculpt mode and I press mouse buttons and nothing happens. 2.28 worked???? Robin
-
What is == ? Robin
-
Gravitar 3D? Robin
-
The language is case sensitive Keep trying till it goes blue Robin
-
Poxy case dependant languages Robin
-
I had to use PRINT ??? Robin
-
I know... We have over 500 posts to catch up on so far.... Robin
-
My e-mail to download the engine was waiting for me at work Monday morning I'm just awaiting access to here, not 2.3. Robin P.S. I think my fav. part of 2.3 is ctrl-g
-
I too am waiting. Can anyone explain what Josh needs from me to get access to the forums? Robin