Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the rules.
Color spawned objects?
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- Tuesday
- Meatbag
- Posts: 9
- Joined: Tue Oct 02, 2018 4:39 am
- Title: Incompetent Hyena
- SFD Account: Tuesday
- Started SFD: September 2016
- Location: East Coast USA
- Gender:
Color spawned objects?
I'm sure there's something very basic I'm missing.
Okay, so, like, SpawnObjectTrigger spawns objects. Trigger.
How do I change the color of the spawned object?
Also is there another way to make a BgTelevision "turn on" that's better than putting 00A on top of 00B?
thank n luv
Okay, so, like, SpawnObjectTrigger spawns objects. Trigger.
How do I change the color of the spawned object?
Also is there another way to make a BgTelevision "turn on" that's better than putting 00A on top of 00B?
thank n luv
0 x
Don't mind me, I'm just a humble mongoloid wrangler.
Subscribe to Tuesday on YouTube.
Subscribe to Tuesday on YouTube.
- Gurt
- Lead Programmer
- Posts: 1885
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
See the ScriptAPI section for the IObject. GetColorPaletteName(), GetColor1(), GetColor2(), GetColor3(), SetColors(...), SetColor1(...), SetColor2(...), SetColor3(...)
"Also is there another way to make a BgTelevision "turn on" that's better than putting 00A on top of 00B?", I think that's the best way of doing it.
"Also is there another way to make a BgTelevision "turn on" that's better than putting 00A on top of 00B?", I think that's the best way of doing it.
0 x
Gurt
- Tuesday
- Meatbag
- Posts: 9
- Joined: Tue Oct 02, 2018 4:39 am
- Title: Incompetent Hyena
- SFD Account: Tuesday
- Started SFD: September 2016
- Location: East Coast USA
- Gender:
Okay, I hope you don't mind dealing with incompetent people.Gurt wrote: ↑Mon Dec 30, 2019 4:50 pmSee the ScriptAPI section for the IObject. GetColorPaletteName(), GetColor1(), GetColor2(), GetColor3(), SetColors(...), SetColor1(...), SetColor2(...), SetColor3(...)
"Also is there another way to make a BgTelevision "turn on" that's better than putting 00A on top of 00B?", I think that's the best way of doing it.
I'mma keep it real with you, chief, I don't know jack about scripting. So, uh, how do I do what you just said?
All I know about is pointing the arrows and the triggers and stuff, so a step by step would be greatly appreciated. Thank you!
0 x
Don't mind me, I'm just a humble mongoloid wrangler.
Subscribe to Tuesday on YouTube.
Subscribe to Tuesday on YouTube.
- Gurt
- Lead Programmer
- Posts: 1885
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
See https://www.mythologicinteractiveforums ... ?f=22&t=66 first and then https://www.mythologicinteractiveforums ... ?f=22&t=67
You can also check out any of the other introductions here https://www.mythologicinteractiveforums ... m.php?f=22
Scripting in SFD assumes you have knowledge in programming in C#.
If you don't want to go the way with scripting just to change some color, create a group instead of a SpawnObjectTrigger (Groups were introduced much later than SpawnObjectTriggers). You can design anything inside a group and trigger them just like SpawnObjectTriggers by pointing to them from a button for example. Just adjust the group to not spawn on start.
You can also check out any of the other introductions here https://www.mythologicinteractiveforums ... m.php?f=22
Scripting in SFD assumes you have knowledge in programming in C#.
If you don't want to go the way with scripting just to change some color, create a group instead of a SpawnObjectTrigger (Groups were introduced much later than SpawnObjectTriggers). You can design anything inside a group and trigger them just like SpawnObjectTriggers by pointing to them from a button for example. Just adjust the group to not spawn on start.
0 x
Gurt
- Tuesday
- Meatbag
- Posts: 9
- Joined: Tue Oct 02, 2018 4:39 am
- Title: Incompetent Hyena
- SFD Account: Tuesday
- Started SFD: September 2016
- Location: East Coast USA
- Gender:
Worked beautifully. Thanks Gurt! One more thing: how can I change an enemy/bot AI / GuardTarget after spawn?Gurt wrote: ↑Wed Jan 01, 2020 11:55 amSee https://www.mythologicinteractiveforums ... ?f=22&t=66 first and then https://www.mythologicinteractiveforums ... ?f=22&t=67
You can also check out any of the other introductions here https://www.mythologicinteractiveforums ... m.php?f=22
Scripting in SFD assumes you have knowledge in programming in C#.
If you don't want to go the way with scripting just to change some color, create a group instead of a SpawnObjectTrigger (Groups were introduced much later than SpawnObjectTriggers). You can design anything inside a group and trigger them just like SpawnObjectTriggers by pointing to them from a button for example. Just adjust the group to not spawn on start.
My plan is to have player turn on TV and zombies are attracted to TV. I tried RallyPoint but NPCs can only Guard one target?
Thanks!
0 x
Don't mind me, I'm just a humble mongoloid wrangler.
Subscribe to Tuesday on YouTube.
Subscribe to Tuesday on YouTube.
- Gurt
- Lead Programmer
- Posts: 1885
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
You need to use GuardTarget, lower the the AggroRange and GuardRange and ChaseRange to maybe 5-10 and disable other behaviors. You could use the default zombie AI (check out the zombie survival map) but set up a GuardTarget around the TV. To prevent the zombies from attacking other opponents disable EliminateEnemies.
0 x
Gurt
- Tuesday
- Meatbag
- Posts: 9
- Joined: Tue Oct 02, 2018 4:39 am
- Title: Incompetent Hyena
- SFD Account: Tuesday
- Started SFD: September 2016
- Location: East Coast USA
- Gender:
I get how to use GuardTarget, but how do I reduce ranges, apply all those other things?Gurt wrote: ↑Thu Jan 09, 2020 9:50 pmYou need to use GuardTarget, lower the the AggroRange and GuardRange and ChaseRange to maybe 5-10 and disable other behaviors. You could use the default zombie AI (check out the zombie survival map) but set up a GuardTarget around the TV. To prevent the zombies from attacking other opponents disable EliminateEnemies.
Thanks again, man!
0 x
Don't mind me, I'm just a humble mongoloid wrangler.
Subscribe to Tuesday on YouTube.
Subscribe to Tuesday on YouTube.
- Gurt
- Lead Programmer
- Posts: 1885
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
Sorry for late response. You need to get the BotBehaviorSet first, modify it and the apply the BotBehaviorSet on the player.Tuesday wrote: ↑Sat Jan 11, 2020 3:09 amI get how to use GuardTarget, but how do I reduce ranges, apply all those other things?Gurt wrote: ↑Thu Jan 09, 2020 9:50 pmYou need to use GuardTarget, lower the the AggroRange and GuardRange and ChaseRange to maybe 5-10 and disable other behaviors. You could use the default zombie AI (check out the zombie survival map) but set up a GuardTarget around the TV. To prevent the zombies from attacking other opponents disable EliminateEnemies.
Thanks again, man!
Here's some "Pseudo code", just writing this out of memory. See exact syntax in the ScriptAPI.
BotBehavior bb = IPlayer.GetBotBehavior()
bb.GuardRange = 10;
bb.SomeOtherProperties = xyz;
IPlayer.SetBotBehavior(bb);
0 x
Gurt
- Mr Argon
- Fighter
- Posts: 56
- Joined: Sat Mar 09, 2019 2:22 am
- SFD Account: Argón (steam)
- SFD Alias: Mr. Argon
- Started SFD: Pre-Alpha 1.8.2c
- Location: Argentina
- Gender:
- Age: 21
In fact... I think you should use "BotBehaviorSet" instead of just "BotBehavior" because the first one is used to set the behavior of enemies while the second one is used to set the predefined AI and the initial input.
Try using this
Try using this
BotBehaviorSet bbs = IPlayer.GetBotBehaviorSet() bbs.GuardRange = (your value here); bbs.ChaseRange = (your value here); IPlayer.SetBotBehaviorSet(bbs);Ask me if you need help, I have no problem in doing some template maps if you need it...
0 x
I'м д Liттlэ оdd... sтill саи livе шiтн тнат.