Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 11 12 13 14 15 … 18 Next »
Making holograms en-masse
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Making holograms en-masse
26-08-2015, 08:16 PM, (This post was last modified: 26-08-2015, 08:18 PM by Destiny's Player.)
#1
Destiny's Player Offline
A passing by member
***
Posts: 237
Threads: 35
Joined: Dec 2013
Making holograms en-masse
Basically, I need to create a bunch of holograms in a single for loop. As in, for the whole ship. But the whole chip dies of Ops starvation, and I can't figure out how to make it pause for a moment between operations. Could anybody help me with that?

Here's the part of the code I try to make. Consts contains all the entities in the ship.

function warpHolo()
if Self:getParent() ~= nil then
local PSelf = Self:getParent()
if Created ~=1 then
WarpField = holograms.create(PSelf:pos(),PSelf:ang()+Angle(90,0,0),
"models/holograms/torus3.mdl",Vector(50,50,50))
WarpGen = {}
WarpGenCap = {}
for i=1,#Consts do
sleep(1)
WarpGen[i] = holograms.create(Consts[i]:pos(),Consts[i]:ang(),
Consts[i]:model(),1.2)
sleep(1)
WarpGen[i]ConfusedetMaterial("models/props_combine/stasisfield_beam")
sleep(1)
WarpGen[i]ConfusedetColor(150,150,255)
sleep(1)
WarpGen[i]ConfusedetAlpha(100)
end

WarpFieldConfusedetMaterial("models/props_combine/portalball001_sheet")
WarpFieldConfusedetAlpha(0)
Created = 1
end
WarpFieldConfusedetPos(PSelf:pos())
WarpFieldConfusedetAng(PSelf:ang()+Angle(90,0,0))
end
end

And here's the sleep function.

function sleep(secs)
timer.simple(secs,function()
printConsole("Sleep finished")
end)
end

P.S. The ship I'm trying to do this with is the size of a Mk 11 shuttle, but with proper pauses, I don't think that size will make much of a difference.
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Making holograms en-masse - by Destiny's Player - 26-08-2015, 08:16 PM
RE: Making holograms en-masse - by SuperPlayer - 26-08-2015, 08:25 PM
RE: Making holograms en-masse - by Person8880 - 26-08-2015, 08:34 PM
RE: Making holograms en-masse - by Destiny's Player - 26-08-2015, 08:43 PM
RE: Making holograms en-masse - by Person8880 - 26-08-2015, 08:52 PM
RE: Making holograms en-masse - by Destiny's Player - 26-08-2015, 09:06 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.