Lugormod Building Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Latest topics
» misc_bsp help
target_random isn't random! I_icon_minitimeThu Aug 25, 2022 5:30 pm by Shadow

» The Sith of Qarr
target_random isn't random! I_icon_minitimeTue Mar 02, 2021 8:57 pm by Cor

» Admin Key/disable teleports
target_random isn't random! I_icon_minitimeMon May 13, 2019 4:06 am by Pierry

» Some possibly useful addons
target_random isn't random! I_icon_minitimeWed May 08, 2019 3:37 pm by Pierry

» Active lugormod servers
target_random isn't random! I_icon_minitimeWed May 08, 2019 11:23 am by Pierry

» Quick links
target_random isn't random! I_icon_minitimeWed May 08, 2019 11:12 am by Pierry

» Help with trigger_usescript
target_random isn't random! I_icon_minitimeThu Sep 22, 2016 8:16 am by flanagon

» New Lugormod U# (Windows + Linux)
target_random isn't random! I_icon_minitimeThu Sep 22, 2016 7:03 am by Ufo

» iobject terminal
target_random isn't random! I_icon_minitimeThu Sep 25, 2014 2:39 pm by flanagon


target_random isn't random!

2 posters

Go down

target_random isn't random! Empty target_random isn't random!

Post by NoHeadz42 Thu Jun 02, 2011 5:24 pm

Hi,

Here's what I'm trying to do : When the map starts, one trandoshan randomly spawns on the map. You need to find the trandoshan, and kill him. If you do, it will give you a ship's part (inventory item). Then, you go sell the ship's part at the terminal. Each time a trandoshan dies, another randomly spawns on the map, and so on. So, before I tell you my problem, here are my codes :

/place target_relay 0 targetname,initial_entity,target,randomtrandoshan
/place target_random 0 targetname,randomtrandoshan,target,randomtrandoshannpc
/place npc_spawner 25 npc_type,trandoshan,count,-1,showhealth,1,health,800,targetname,randomtrandoshannpc,NPC_target,randomtrandoshan,NPC_target5,randomtrandoshanitem (I'VE PLACED LIKE 10 NPCS LIKE THIS ONE ALL OVER THE MAP, ALL WITH THE SAME EXACT CODE)

But, the trandoshans will always spawn in the same EXACT order. I saved the map, I restarted the server many times, but the first trandoshan will always spawn at the same place. Then, the second too, and the third, etc.
Can you help me? Please, I really want to do this, but I can't do it if it isn't random, it's gonna be too easy!

Thanks a lot.
NoHeadz42
NoHeadz42
Standard Member
Standard Member

Posts : 30
Join date : 2011-05-29
Location : Canada

Back to top Go down

target_random isn't random! Empty Re: target_random isn't random!

Post by Zkyo Sun Jun 05, 2011 6:34 am

That setup should work, not sure why it's not working right. I've always found target_random to be somewhat biased, though. Maybe it's a glitch in lugormod itself?
avatar
Zkyo
Admin
Admin

Posts : 384
Join date : 2010-03-29
Age : 30
Location : Grand Rapids, Michigan, USA

https://lugorhelp.forumotion.com

Back to top Go down

target_random isn't random! Empty Re: target_random isn't random!

Post by NoHeadz42 Sun Jun 05, 2011 12:52 pm

Crap maybe you're right.... Well I don't know what I'm gonna do lol I really wanted this quest to work. Too bad
NoHeadz42
NoHeadz42
Standard Member
Standard Member

Posts : 30
Join date : 2011-05-29
Location : Canada

Back to top Go down

target_random isn't random! Empty Re: target_random isn't random!

Post by Zkyo Thu Jun 09, 2011 10:21 am

Maybe you could try a somewhat more complex system with lmd_chance? It's more unstable and complicated, but its an alternative to target_random.
avatar
Zkyo
Admin
Admin

Posts : 384
Join date : 2010-03-29
Age : 30
Location : Grand Rapids, Michigan, USA

https://lugorhelp.forumotion.com

Back to top Go down

target_random isn't random! Empty Re: target_random isn't random!

Post by NoHeadz42 Thu Jun 09, 2011 11:48 am

Well actually I got it to work lol, forgot to write it here :

/place target_relay 0 targetname,initial_entity,target,randomtrandoshan
/place target_random 0 targetname,randomtrandoshan,target,random2trandoshan
/place target_random 0 targetname,random2trandoshan,target,randomtrandoshannpc
/place npc_spawner 25 npc_type,trandoshan,count,-1,showhealth,1,health,800,targetname,randomtrandoshannpc,NPC_target,randomtrandoshan,NPC_target5,randomtrandoshanitem (I'VE PLACED LIKE 10 NPCS LIKE THIS ONE ALL OVER THE MAP, ALL WITH THE SAME EXACT CODE)

It's kind of complex too, but it's not too bad, and it works!
NoHeadz42
NoHeadz42
Standard Member
Standard Member

Posts : 30
Join date : 2011-05-29
Location : Canada

Back to top Go down

target_random isn't random! Empty Re: target_random isn't random!

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum