Author |
Topic: quick question.. |
dundy |
|
General Member Since: Dec 14, 2004 Posts: 768 Last: Nov 1, 2020 [view latest posts] |
|
|
|
|
techno2sl |
|
General Member Since: Aug 5, 2004 Posts: 2977 Last: Oct 14, 2010 [view latest posts] |
|
|
|
dundy |
|
General Member Since: Dec 14, 2004 Posts: 768 Last: Nov 1, 2020 [view latest posts] |
|
|
|
Category: CoDWW MP Mapping Posted: Monday, May. 25, 2009 06:58 pm |
|
don,t get any errors ..script seems fine have my map fully portalt
some guys at rgn server asked about it...
seems some player have this happening when planes fly over..
want to know if there,s a fix...
|
|
|
|
dundy |
|
General Member Since: Dec 14, 2004 Posts: 768 Last: Nov 1, 2020 [view latest posts] |
|
|
|
Category: CoDWW MP Mapping Posted: Monday, May. 25, 2009 07:10 pm |
|
Code: main() { level thread planes(); } planes() { level.PlaneSpeed = 10; stuka1 = getent ("stuka1","targetname"); stuka2 = getent ("stuka2","targetname"); stuka3 = getent ("stuka3","targetname"); temp = getent (stuka1.target,"targetname"); stuka1.dest = temp.origin; stuka1.start = stuka1.origin; stuka1 hide(); temp = getent (stuka2.target,"targetname"); stuka2.dest = temp.origin; stuka2.start = stuka2.origin; stuka2 hide(); temp = getent (stuka3.target,"targetname"); stuka3.dest = temp.origin; stuka3.start = stuka3.origin; stuka3 hide(); wait 2; while (1) { stuka1 thread plane_flyby("corsair"); wait .15; stuka2 thread plane_flyby("corsair"); wait .15; stuka3 thread plane_flyby("corsair"); wait 120; } } plane_flyby(sound) { // If you specified a sound to play then play it if (isdefined (sound)) self playsound (sound); wait 0; self show(); self moveto(self.dest, level.PlaneSpeed, 0.1, 0.1); wait level.PlaneSpeed; self hide(); self.origin = self.start; }
this my plane gsc
can you check it techno2sl
edited on May. 25, 2009 03:14 pm by dundy |
|
|
|
hansgrubber |
|
General Member Since: Aug 7, 2004 Posts: 196 Last: Jul 6, 2009 [view latest posts] |
|
|
|
dundy |
|
General Member Since: Dec 14, 2004 Posts: 768 Last: Nov 1, 2020 [view latest posts] |
|
|
|
|
playername |
|
Preferred Member Since: Aug 24, 2006 Posts: 821 Last: Apr 15, 2011 [view latest posts] |
|
|
|
|
Category: CoDWW MP Mapping Posted: Monday, May. 25, 2009 10:44 pm |
|
Ok, I have changed a few things, and make it easier to map for. This makes the script a bit shorter and allows you to add more than just 3 stukas. (TESTED)
Mapping
1. Place your stuckas.
2. Give them a targetname of stukas
3. Place a script_origin for the destination and connect the stuka to them.
Script
If you would like to, change the sound of the stuckas or speed.
level.PlaneSpeed = 10;
level.stukaSound = "corsair";
Code:
main()
{
maps\mp\_load::main();
thread stuka_start();
}
stuka_start()
{
level.PlaneSpeed = 10;
level.stukaSound = "corsair";
stukas = getEntArray("stukas", "targetname");
for(i=0;i < stukas.size;i++)
{
stuka = stukas[i];
stuka.dest = getEnt(stuka.target, "targetname").origin;
stuka.start = stuka.origin;
stuka hide();
}
wait 10;
stukas thread start_flight();
}
start_flight()
{
for(i=0;i < self.size;i++)
{
self[i] thread plane_flyby();
wait .15;
}
wait 120;
self thread start_flight();
}
plane_flyby()
{
// If you set level.stukaSound, play it.
if(isdefined(level.stukaSound))
self playsound(level.stukaSound);
self show();
self moveto(self.dest, level.PlaneSpeed);
wait level.PlaneSpeed;
self hide();
self.origin = self.start;
}
edited on May. 25, 2009 06:45 pm by playername |
nullFew tips for coding.
1. Keep the script as short as possible.
2. Don't comment every line. Only comment portions where they may be needed to point something out.
3. Don't over complicate the script, keep it organized and easy to read.
These help you find simple errors and makes it easy to make changes. |
|
|
|
dundy |
|
General Member Since: Dec 14, 2004 Posts: 768 Last: Nov 1, 2020 [view latest posts] |
|
|
|
|
playername |
|
Preferred Member Since: Aug 24, 2006 Posts: 821 Last: Apr 15, 2011 [view latest posts] |
|
|
|
|
|
dundy |
|
General Member Since: Dec 14, 2004 Posts: 768 Last: Nov 1, 2020 [view latest posts] |
|
|
|
Category: CoDWW MP Mapping Posted: Wednesday, May. 27, 2009 03:45 am |
|
Well my map is fully portaled..
I get people saying how good Fps they get so,that shoulld be good
It,s just that some people seem to get a Fps drop or even a
connection interruption when the plane starts to fly over..
One guy says he go from 100 Fps to 60 Fps....
So i wanna try and fix it..
being new to this so maybe it,s noobish but what if put aportal cell
around the plane path wouldn,t that help...
edited on May. 26, 2009 11:52 pm by dundy |
|
|
|