• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Need suggestion / help
#1
Hello Burgershot!

This is what I'm trying to create:

Let's say that I have a map with 800 objects and that map is constructed fine. Now, I want to change position of every object of that map to random(90) and after doing that I want to revert the map to her origin state via Move Dyn Object (default coordinates)

Any idea how could I do this without using many arrays as I'll have 5000 objects that'll repeat this Per-player (I'm (re)creating someone's tutorial system, this is the exact thing I want:?https://youtu.be/7RMptvUBqQw (Corelli from sa-mp forums is the creator))
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#2
create a variable that generates the random offset. Spawn the object with the random offset and instantly move the object to its own location but subtract the offset then. Also if they are in a grid, just like that video, you can easily offset it by the grid amounts themselves.
Also in the streamer you can use E_STREAMER_EXTRA_ID together with Streamer_Get<type>Data to assign data to the objects themselves to know what they're supposed to without having an array.
[Image: qPwh60X.png]

  Reply


Forum Jump: