Latest topics
target_random isn't random!
2 posters
Page 1 of 1
target_random isn't random!
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.
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- Standard Member
- Posts : 30
Join date : 2011-05-29
Location : Canada
Re: target_random isn't random!
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?
Re: target_random isn't random!
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- Standard Member
- Posts : 30
Join date : 2011-05-29
Location : Canada
Re: target_random isn't random!
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.
Re: target_random isn't random!
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!
/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- Standard Member
- Posts : 30
Join date : 2011-05-29
Location : Canada
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Thu Aug 25, 2022 5:30 pm by Shadow
» The Sith of Qarr
Tue Mar 02, 2021 8:57 pm by Cor
» Admin Key/disable teleports
Mon May 13, 2019 4:06 am by Pierry
» Some possibly useful addons
Wed May 08, 2019 3:37 pm by Pierry
» Active lugormod servers
Wed May 08, 2019 11:23 am by Pierry
» Quick links
Wed May 08, 2019 11:12 am by Pierry
» Help with trigger_usescript
Thu Sep 22, 2016 8:16 am by flanagon
» New Lugormod U# (Windows + Linux)
Thu Sep 22, 2016 7:03 am by Ufo
» iobject terminal
Thu Sep 25, 2014 2:39 pm by flanagon