Modme Forums

Moving models help

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: yologirlgamer
Anyone know how to make a model move? I want some planes to be flying over the map


ModmeBot:

Reply By: soul-toktzt

yologirlgamer
Anyone know how to make a model move? I want some planes to be flying over the map



You can use the moveX, moveY, moveZ function to move something to a certain spot.


ModmeBot:

Reply By: Abnormal202
You can also use MoveTo:

void moveto(<point>,<time>,[acceleration time],[deceleration time])</time></point>

for example you could put structs around the map you want the planes to fly to, and use a loop:
while(1)
{
	plane MoveTo(a.origin, 5);
	wait(5);
	plane MoveTo(b.origin, 5);
	wait(5);
	plane MoveTo(c.origin, 6);
	wait(6);
	plane MoveTo(d.origin, 5);
	wait(5);
}


ModmeBot:

Reply By: soul-toktzt

Abnormal202
You can also use MoveTo: void moveto(<point>,<time>,[acceleration time],[deceleration time]) for example you could put structs around the map you want the planes to fly to, and use a loop: while(1) { plane MoveTo(a.origin, 5); wait(5); plane MoveTo(b.origin, 5); wait(5); plane MoveTo(c.origin, 6); wait(6); plane MoveTo(d.origin, 5); wait(5); }

So the a to d are the names of the struct? Or do you have to do the same as models / triggers / brushes?

a = GetEnt("struct_01", "targetname");
</time></point>


ModmeBot:

Reply By: Abnormal202

soul-toktzt
Abnormal202 You can also use MoveTo: void moveto(<point>,<time>,[acceleration time],[deceleration time]) for example you could put structs around the map you want the planes to fly to, and use a loop: while(1) { plane MoveTo(a.origin, 5); wait(5); plane MoveTo(b.origin, 5); wait(5); plane MoveTo(c.origin, 6); wait(6); plane MoveTo(d.origin, 5); wait(5); } So the a to d are the names of the struct? Or do you have to do the same as models / triggers / brushes? a = GetEnt("struct_01", "targetname");

if you're putting structs in the air you would get them with:
a = struct::Get("a","targetname");
</time></point>


ModmeBot:

Reply By: soul-toktzt

Abnormal202
soul-toktzt Abnormal202 You can also use MoveTo: void moveto(<point>,<time>,[acceleration time],[deceleration time]) for example you could put structs around the map you want the planes to fly to, and use a loop: while(1) { plane MoveTo(a.origin, 5); wait(5); plane MoveTo(b.origin, 5); wait(5); plane MoveTo(c.origin, 6); wait(6); plane MoveTo(d.origin, 5); wait(5); } So the a to d are the names of the struct? Or do you have to do the same as models / triggers / brushes? a = GetEnt("struct_01", "targetname"); if you're putting structs in the air you would get them with: a = struct::Get("a","targetname");


alright, thank you :)</time></point>


ModmeBot:

Reply By: yologirlgamer
Right i'm a little poopy at scripting so where abouts would i put these scripts? I love mapping but scripting isn't my strongest point


ModmeBot:

Reply By: soul-toktzt

yologirlgamer
Right i'm a little poopy at scripting so where abouts would i put these scripts? I love mapping but scripting isn't my strongest point

Root folder --> usermaps --> YOURMAPNAME --> scripts --> zm --> zm_YOURMAPNAME.gsc.
or in the launcher you select your map and right click it, go to map folder, scripts, zm, zm_YOURMAPNAME.gsc.

You create the script / functions below the "main" function and in the main you put "thread FUNCTION_NAME();"