This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk
Forum rules
Forum rules
Be able to change object color
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
-
Hoang Marcel
- Superfighter

- Posts: 62
- Joined: Sun Mar 20, 2016 3:40 am
- Title: Custom map lover
- Started SFD: PreAlpha 1.6.4
- Location: Vietnam
- Gender:
Be able to change object color
How do you create color object through scripting?
Game.CreateObject("BgWall00B",Position);
Game.CreateObject("BgWall00B",Position);
1 x
- Motto73
- Superfighter

- Posts: 316
- Joined: Mon May 09, 2016 7:35 am
- Title: Lazy ass
- SFD Account: Motto73
- Started SFD: Multiplayer Test Demo
- Location: Sunny City
- Gender:
- Age: 26
Hi Hoang!
I think that you are able to change the object via script by setting that wall into a variable.
IObject wall = Game.CreateObject("BgWall00B",Position);
wall.Color = Color(r,g,b); //red, green, blue
Not sure if it only works in text. Give it a try!
For more information:
Read the Script Api_ Color Struct Reference.
And by the way, you have made some great maps! I like them.
I think that you are able to change the object via script by setting that wall into a variable.
IObject wall = Game.CreateObject("BgWall00B",Position);
wall.Color = Color(r,g,b); //red, green, blue
Not sure if it only works in text. Give it a try!
For more information:
Read the Script Api_ Color Struct Reference.
And by the way, you have made some great maps! I like them.
0 x

-
Hoang Marcel
- Superfighter

- Posts: 62
- Joined: Sun Mar 20, 2016 3:40 am
- Title: Custom map lover
- Started SFD: PreAlpha 1.6.4
- Location: Vietnam
- Gender:
-
Juansero29
- Fighter

- Posts: 52
- Joined: Sun Jun 12, 2016 1:07 am
- Title: Superfighter
- SFD Account: Juansero29
- SFD Alias: Juansero29
- Started SFD: Pre-Alpha 1.0.5
- Location: France
- Gender:
- Age: 27
- Contact:
Has anyone gotten the answer for this question yet? I need it too in order to create colored ballons in a function called by a trigger. Please, any hint could help!
0 x
Code: Select all
boom() {
echo "BOOM!";
}
----------------------------------------
Setting the world free since 1998
----------------------------------------
- JakSparro98
- Superfighter

- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 27
Today is not possible to spawn an object with color parameters, even not to set it after it's created, currently there's not really nothing to handle color with the IObject class, It's a bit weird that no one have suggested nothing like this so far, I'm going to post this in the script suggestions.Juansero29 wrote:Has anyone gotten the answer for this question yet? I need it too in order to create colored ballons in a function called by a trigger. Please, any hint could help!
2 x
-
Juansero29
- Fighter

- Posts: 52
- Joined: Sun Jun 12, 2016 1:07 am
- Title: Superfighter
- SFD Account: Juansero29
- SFD Alias: Juansero29
- Started SFD: Pre-Alpha 1.0.5
- Location: France
- Gender:
- Age: 27
- Contact:
JakSparro98 wrote:Today is not possible to spawn an object with color parameters, even not to set it after it's created, currently there's not really nothing to handle color with the IObject class, It's a bit weird that no one have suggested nothing like this so far, I'm going to post this in the script suggestions.Juansero29 wrote:Has anyone gotten the answer for this question yet? I need it too in order to create colored ballons in a function called by a trigger. Please, any hint could help!
Thanks for answering! Yes, I think it's indeed very important. It would be a great functionality to have in the future.
0 x
Code: Select all
boom() {
echo "BOOM!";
}
----------------------------------------
Setting the world free since 1998
----------------------------------------
