Forum

> > CS2D > Mods > Item Spawn Random
ForenübersichtCS2D-Übersicht Mods-ÜbersichtEinloggen, um zu antworten

Englisch Item Spawn Random

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Item Spawn Random

Cl8
User Off Offline

Zitieren
Hello everybody, i start in lua script and i wanna make a map with random item spawn like : only guns here, only items here, only health here etc.... ( sorry for my english i'am french ) i don't know how realise this and i have make a research but find nothing on this . And after i wanna make a lua for time on the map like dark and after 30min the sun comming and loop again

thanks a lot for you'r support

Goodbye

alt Re: Item Spawn Random

Alistaire
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local AA = {'timer' = 0, 'stage' = 0, 'stages' = 24, 'stagetime' = 60, 'image' = 0}

AA.image = image("gfx/block.bmp", 320, 240, 3)
imagescale(AA.image, 20, 15)

addhook("second", "AA_second")

function AA_second()
	AA.timer = AA.timer + 1
	if AA.timer == AA.stagetime then
		AA.timer = 0
		AA.stage = AA.stage + 1
		if AA.stage == AA.stages then
			AA.stage = 0
		end
	end
	local alphastage = 0.7 * (AA.stage * AA.timer) / (AA.stages * AA.stagetime)
	imagealpha(AA.image, alphastage)
end

This'd do for a day/night system prolly.

alt Re: Item Spawn Random

Cl8
User Off Offline

Zitieren
thanks, but i have put this in a lua, after launch the lua don't work :s
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Mods-ÜbersichtCS2D-ÜbersichtForenübersicht