More items spawned -1 reply

Please wait...

Ziomkers

Slightly cooler than a n00b

50 XP

27th July 2008

0 Uploads

32 Posts

0 Threads

#1 8 years ago

Hello Once and long time ago Atrocious gave me this script for spawning something in my inventory if i dont have it. The script looks like this: if not db.actor:object("bread") then alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) end

Which adds me 1 bread whenever i dont have one. My question is how to make it spawn 10 breads everytime i dont have one,or when i have less than 10. I want it to use for ammunition,because increasing size of 1 ammo pack doesnt solve properly my problem. Anybody who knows how to do it,please answer in here. Awaiting




insanelazarez

Here take this basic equipment

50 XP

27th April 2008

0 Uploads

121 Posts

0 Threads

#2 8 years ago

Alternative 'A':

if not db.actor:object("bread") then for i = 1, 10 do alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) end end

Alternative 'B'

if not db.actor:object("bread") then alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) alife():create("bread", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id()) end