How am I going to achieve this ?
#1

hi,
Well.....
let me get to the point.

I have about 10,000 objects. Now I want to set all of them to world 0.
I'm using incognito's object streamer heres one example of a object from my gm.
pawn Код:
CreateDynamicObject( 9241,-3350.004000,  -93.173000, 123.940000, 0.0000, 0.0000,   0.0000); // AdminCastle
Thats from my gm. On the streamer topic it said you can include a world. Trouble is all my objects and the converter I used didn't include all natives.

only x,y,z,rx,ry,rz

It could be
pawn Код:
CreateDynamicObject( 9241,-3350.004000,  -93.173000, 123.940000, 0.0000, 0.0000,   0.0000, 1); // AdminCastle
//world 1.
[sarcasm]yeah hey! theres one done. another 9,000 to go! yey[/sarcasm]

I would be really appreciated if someone could help me , otherwise im clueless of what to do.
If you could maybe make something that converts all objects to that... or just something.

By the way it's world 0 I want i just used 1 as an example. well actually any world.

All help is really appreciated, once again!

Thank you alot.
Reply
#2

after creating all objects.

pawn Код:
for(new i, ao = CountDynamicObjects(); i < ao; i++)
{
if(!IsValidDynamicObject(i)) continue;
Streamer_SetIntData(STREAMER_TYPE_OBJECT, i, E_STREAMER_WORLD_ID, 0);
}
sorry for the bad indent.. and forgot for(
Reply
#3

Quote:
Originally Posted by Donya
Посмотреть сообщение
after creating all objects.

pawn Код:
new i, ao = CountDynamicObjects(); i < ao; i++)
{
if(!IsValidDynamicObject(i)) continue;
Streamer_SetIntData(STREAMER_TYPE_OBJECT, i, E_STREAMER_WORLD_ID, 0);
}
sorry for the bad indent
Thanks but:

pawn Код:
C:\Users\Lewis2\Desktop\eXtreme StuntinG\gamemodes\X-ST.pwn(445) : warning 215: expression has no effect
C:\Users\Lewis2\Desktop\eXtreme StuntinG\gamemodes\X-ST.pwn(445) : error 001: expected token: ";", but found ")"
C:\Users\Lewis2\Desktop\eXtreme StuntinG\gamemodes\X-ST.pwn(445) : error 029: invalid expression, assumed zero
C:\Users\Lewis2\Desktop\eXtreme StuntinG\gamemodes\X-ST.pwn(447) : error 024: "break" or "continue" is out of context
I put it under OnGamemodeInt
I'm sure it went there. Tried to fix these silly errors but can't
A little help , thanks.
Reply
#4

Correction:

pawn Код:
for(new i, ao = CountDynamicObjects(); i < ao; i++)
{
    if(!IsValidDynamicObject(i)) continue;
    Streamer_SetIntData(STREAMER_TYPE_OBJECT, i, E_STREAMER_WORLD_ID, 0);
}
Reply
#5

This loop above is a solution, but you can do another thing:
- Select all of the objects.
- Press Ctrl+H, use "Selected text only".
- On the first line write ");", on the second ",1);"
- Press OK and then Yes to all.
Reply
#6

Quote:
Originally Posted by Amit_B
Посмотреть сообщение
This loop above is a solution, but you can do another thing:
- Select all of the objects.
- Press Ctrl+H, use "Selected text only".
- On the first line write ");", on the second ",1);"
- Press OK and then Yes to all.
Thanks all , but I think I will stick with the loop.
Will give it a try and post the results.
I really can't be bothered selecting 10,000 again (last time for converting).

Reply
#7

At all you need just to put the cursor on the start of the first line and scroll the script to the last line, then press shift and put the cursor on the end of the line.
This will select all of the objects
Reply
#8

Quote:
Originally Posted by Amit_B
Посмотреть сообщение
At all you need just to put the cursor on the start of the first line and scroll the script to the last line, then press shift and put the cursor on the end of the line.
This will select all of the objects
Just wanted to say I changed my mind and used your idea. As I can select only the ones I want to change.
But still thanks to the loop creators.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)