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.
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.
-
- 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: 24
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
-
- Superfighter
- Posts: 62
- Joined: Sun Mar 20, 2016 3:40 am
- Title: Custom map lover
- Started SFD: PreAlpha 1.6.4
- Location: Vietnam
- Gender:
-
- 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: 25
- 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: 25
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
-
- 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: 25
- 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
----------------------------------------