How to define multiple Objects at once -
Nutcracker - 15.09.2015
Hey guys... I am basically new to scripting(I have no intentions of learning pwn), so I am basically a mapper, But when you come to 'SetObjectMaterial' you need to script that, so I was wondering if we can define multiple objects at once for example:
new object;
object = CreateObject(7497, 1066.41406, 2110.75781, 14.41406, 356.85840, 0.00000, 3.14159);
CreateObject(7497, 1066.41406, 2110.75781, 14.41406, 356.85840, 0.00000, 3.14159);
CreateObject(7497, 1066.41406, 2110.75781, 14.41406, 356.85840, 0.00000, 3.14159);
CreateObject(7497, 1066.41406, 2110.75781, 14.41406, 356.85840, 0.00000, 3.14159);
CreateObject(7497, 1066.41406, 2110.75781, 14.41406, 356.85840, 0.00000, 3.14159);
CreateObject(7497, 1066.41406, 2110.75781, 14.41406, 356.85840, 0.00000, 3.14159);
CreateObject(7497, 1066.41406, 2110.75781, 14.41406, 356.85840, 0.00000, 3.14159);
CreateObject(7497, 1066.41406, 2110.75781, 14.41406, 356.85840, 0.00000, 3.14159);
so when I change their texture I would simple do
SetObjectMaterial(object, 0, 18202, "w_towncs_t", "hatwall256hi", 0xFFFFFFFF);
it will change the texture of all the defined Objects.
Please if I didn't do it right(the define part) please correct me, It would really help me and yeah, There is a 1 rep in helping me <3
Re: How to define multiple Objects at once -
Jefff - 15.09.2015
pawn Код:
for(new i = object; i < last_created_object+1; i++)
if(GetObjectModel(i) == 7497) // if model is 7497
SetObjectMaterial(i, 0, 18202, "w_towncs_t", "hatwall256hi", 0xFFFFFFFF);
Re: How to define multiple Objects at once -
Nutcracker - 15.09.2015
Can you do the same with the objects I defined on the main post? Please, Cause what you did, I didn't understand shit(No offence, I liked it)
Re: How to define multiple Objects at once -
Nutcracker - 15.09.2015
Wait, I think I got it! Just explain me how it works so I could so the same with my other map objects.
Re: How to define multiple Objects at once -
Jefff - 15.09.2015
Its scanning all created objects and checking which modelid is 7497, if model match we change his material
Re: How to define multiple Objects at once -
Nutcracker - 15.09.2015
Alright, Thanks, Luv ya <3
Rep Given.
Re: How to define multiple Objects at once -
Nutcracker - 15.09.2015
I'm getting an error
Код:
D:\Server\gamemodes\gamemode.pwn(96) : error 017: undefined symbol "last_created_object"
D:\Server\gamemodes\gamemode.pwn(100) : error 017: undefined symbol "last_created_object"
D:\Server\gamemodes\gamemode.pwn(100) : error 017: undefined symbol "i"
Re: How to define multiple Objects at once -
VoltMeter - 15.09.2015
Dude, Update your sscanf and streamer plugins + includes, that'll fix your problem of errors
Re: How to define multiple Objects at once -
Pottus - 15.09.2015
Why don't you just import your maps into a newer in game editor that supports texturing? It will make the process a quicker.
Re: How to define multiple Objects at once -
Nutcracker - 15.09.2015
@Voltmeter, As I said above, I just need the Gamemode temporary, I just give it to someone or just keep it for Upload. so I don't wanna go in the deep scripting stuff, Not now...
@Pottus, I did that, and I'm doing that too, lal I use you're Texture studio but the problem is that I already made the map, I don't know how to import it to your in-game Texture studio, Again as I said I'm am really new to scripting.