CoD 4 Set Next Spawn Point (origin)
Moderator: Core Staff
CoD 4 Set Next Spawn Point (origin)
How is it possible to set the next spawn point (origin) for a player?
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: CoD 4 Set Next Spawn Point (origin)
Every gametype has its own logic.
S&D has fixed.
DM has random.
TDM has a "far from enemy, close to team".
But you do not determine which spawnpoint is used in mapping.
S&D has fixed.
DM has random.
TDM has a "far from enemy, close to team".
But you do not determine which spawnpoint is used in mapping.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: CoD 4 Set Next Spawn Point (origin)
This system is obviously not working. 99% of the matches i played of TDM i spawned atleast once in the middle of the enemy team without any teammates around me.Drofder2004 wrote:TDM has a "far from enemy, close to team".
-=[[CoDJumper.com Movies]]=-
[[Ambush]] || [[Backlot]] || [[Bloc]] || [[Bog]] || [[Broadcast]] || [[Chinatown]] || [[Countdown]]
[[Crash]] || [[Creek]] || [[Crossfire]] || [[District]] || [[Downpour]] || [[Killhouse]] || [[Overgrown]]
[[Pipeline]] || [[Shipment & Wetwork]] || [[Showdown]] || [[Strike]] || [[Vacant]]
A woman can fake an orgasm, but a man can fake an entire relationship
[[Ambush]] || [[Backlot]] || [[Bloc]] || [[Bog]] || [[Broadcast]] || [[Chinatown]] || [[Countdown]]
[[Crash]] || [[Creek]] || [[Crossfire]] || [[District]] || [[Downpour]] || [[Killhouse]] || [[Overgrown]]
[[Pipeline]] || [[Shipment & Wetwork]] || [[Showdown]] || [[Strike]] || [[Vacant]]
A woman can fake an orgasm, but a man can fake an entire relationship
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: CoD 4 Set Next Spawn Point (origin)
TDM will always have a complicated logic, especially on busy servers.Hoogie wrote:This system is obviously not working. 99% of the matches i played of TDM i spawned atleast once in the middle of the enemy team without any teammates around me.Drofder2004 wrote:TDM has a "far from enemy, close to team".
If you play with more than 8 players per team, you essentially have to calculate the positions of all 8 enemies, find an average point and then find the average point of your allies and then locate the nearest spawn between the two, with such small maps, it is likely that you may spawn very close to the enemy, simply because one enemy is on the other side of the map.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: CoD 4 Set Next Spawn Point (origin)
I don't mean one enemy, i mean in the middle on the enemy spawn.Drofder2004 wrote:TDM will always have a complicated logic, especially on busy servers.Hoogie wrote:This system is obviously not working. 99% of the matches i played of TDM i spawned atleast once in the middle of the enemy team without any teammates around me.Drofder2004 wrote:TDM has a "far from enemy, close to team".
If you play with more than 8 players per team, you essentially have to calculate the positions of all 8 enemies, find an average point and then find the average point of your allies and then locate the nearest spawn between the two, with such small maps, it is likely that you may spawn very close to the enemy, simply because one enemy is on the other side of the map.
-=[[CoDJumper.com Movies]]=-
[[Ambush]] || [[Backlot]] || [[Bloc]] || [[Bog]] || [[Broadcast]] || [[Chinatown]] || [[Countdown]]
[[Crash]] || [[Creek]] || [[Crossfire]] || [[District]] || [[Downpour]] || [[Killhouse]] || [[Overgrown]]
[[Pipeline]] || [[Shipment & Wetwork]] || [[Showdown]] || [[Strike]] || [[Vacant]]
A woman can fake an orgasm, but a man can fake an entire relationship
[[Ambush]] || [[Backlot]] || [[Bloc]] || [[Bog]] || [[Broadcast]] || [[Chinatown]] || [[Countdown]]
[[Crash]] || [[Creek]] || [[Crossfire]] || [[District]] || [[Downpour]] || [[Killhouse]] || [[Overgrown]]
[[Pipeline]] || [[Shipment & Wetwork]] || [[Showdown]] || [[Strike]] || [[Vacant]]
A woman can fake an orgasm, but a man can fake an entire relationship
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: CoD 4 Set Next Spawn Point (origin)
I know, but it is just "logic" it is not foolproof and always will have flaws in random spawns.Hoogie wrote:I don't mean one enemy, i mean in the middle on the enemy spawn.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: CoD 4 Set Next Spawn Point (origin)
Well I don't want to change all the spwan points.
I just want to do something like this:
I just want to do something like this:
Code: Select all
if(value_x == 1)
{
self Next_Spawn_Origin((200,200,1000)); // I don't know how to set the next spawn place
self IPrintLnBold("Do you really think you can fly?");
}
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: CoD 4 Set Next Spawn Point (origin)
Are you coding a map or mod?
If map, which gametype?
If map, which gametype?
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: CoD 4 Set Next Spawn Point (origin)
Sorry for the less amount of info.
I am (trying to) scripting a mod.
I am (trying to) scripting a mod.
Re: CoD 4 Set Next Spawn Point (origin)
Is this even possible?
Or is it a no go?
Or is it a no go?
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: CoD 4 Set Next Spawn Point (origin)
We can't help you if we don't have enough info. I'm still not sure what you're trying to achieve with this.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: CoD 4 Set Next Spawn Point (origin)
Sound to me like progressive spawn points.
Such as save points.
Firstly, you need to make sure you are using a fixed location spawn logic (such as S&D)
[You should be able to find this in the S&D gametype file]
Secondly, you would then need to define origins for all your moved spawnpoints, whether this be by using ingame viewpos or mapping (if you are mapping, this becomes easier)
Finally, you need to create a script that moves the spawnpoints when requested.
Its a fair amount of work, and being udner the impression you haven't done much coding, I would suggest rethinking. If you are a good coder, then yo ushould've been able to work this out by reading the gametype files.
Such as save points.
Firstly, you need to make sure you are using a fixed location spawn logic (such as S&D)
[You should be able to find this in the S&D gametype file]
Secondly, you would then need to define origins for all your moved spawnpoints, whether this be by using ingame viewpos or mapping (if you are mapping, this becomes easier)
Finally, you need to create a script that moves the spawnpoints when requested.
Its a fair amount of work, and being udner the impression you haven't done much coding, I would suggest rethinking. If you are a good coder, then yo ushould've been able to work this out by reading the gametype files.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: CoD 4 Set Next Spawn Point (origin)
I thought it where just a few commands or so to set the next spawn origin.
Maybe I should try an other method then.
This could also work for what I want:
1. I need the whole screen to turn black. So that the player can't see anything. Also not his minimap. Maybe it is possible to just destroy all hud elements and add a new hud element that gives him a black screen. And when he respawns the black hud element will be destroyd. And the other hud elements will be rebuild by the game.
Or am I wrong?
This is my code for the blackscreen. Only it fails because it doesn't fill my whole screen (I play @ 1920x1080) and you can still see the minimap trough it.
2. Then it need to look likes the player dies.
I already had a small piece of script that copy's the player and then start the copy to ragdoll. But the problem is that only the player itself saw the ragdoll.
How can I let everybody see the ragdoll?
And how can I place the skull icon in the bottom left corner so that it looks like that player killed himself?
This is what I have for the ragdoll:
3. And how can I prevent that the player is visible on the minimap? He should also not be visible for his team mates.
Sorry for this shit load of question
I hope someone can and wants to help me.
Maybe I should try an other method then.
This could also work for what I want:
1. I need the whole screen to turn black. So that the player can't see anything. Also not his minimap. Maybe it is possible to just destroy all hud elements and add a new hud element that gives him a black screen. And when he respawns the black hud element will be destroyd. And the other hud elements will be rebuild by the game.
Or am I wrong?
This is my code for the blackscreen. Only it fails because it doesn't fill my whole screen (I play @ 1920x1080) and you can still see the minimap trough it.
Code: Select all
blackscreen_HUD()
{
if (isDefined(self.blackscreen))
self.blackscreen destroy();
wait 0.05;
self.blackscreen = newClientHudElem(self);
self.blackscreen.sort = -100;
self.blackscreen.archived = false;
self.blackscreen.alignX = "left";
self.blackscreen.alignY = "top";
self.blackscreen.x = 0;
self.blackscreen.y = 0;
self.blackscreen.alpha = 1;
self.blackscreen setShader("black", 640, 480);
}
I already had a small piece of script that copy's the player and then start the copy to ragdoll. But the problem is that only the player itself saw the ragdoll.
How can I let everybody see the ragdoll?
And how can I place the skull icon in the bottom left corner so that it looks like that player killed himself?
This is what I have for the ragdoll:
Code: Select all
body = self ClonePlayer(0);
wait 0.05;
body StartRagdoll();
wait 1;
body Hide();
Sorry for this shit load of question
I hope someone can and wants to help me.
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: CoD 4 Set Next Spawn Point (origin)
1. self.blackscreen.foreground = 1;
and sort = 100.
2. The death we see is not ragdoll, but an animation, with the body becoming a ragdoll after.
This is untested and pulled straight from the gametype files.
Message in bottom left
3. Not sure, but maybe locate and modify the icons used and make them full alpha?
and sort = 100.
2. The death we see is not ragdoll, but an animation, with the body becoming a ragdoll after.
This is untested and pulled straight from the gametype files.
Code: Select all
deathAnim = ent getcorpseanim();
startFrac = 0.35;
if ( animhasnotetrack( deathAnim, "start_ragdoll" ) )
{
times = getnotetracktimes( deathAnim, "start_ragdoll" );
if ( isDefined( times ) )
startFrac = times[0];
}
waitTime = startFrac * getanimlength( deathAnim );
wait( waitTime );
if ( isDefined( ent ) )
ent startragdoll( 1 );
Code: Select all
obituary(self, self, "none", "MOD_SUICIDE");
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: CoD 4 Set Next Spawn Point (origin)
For 1. you have to allign it "fullscreen" on both the X and Y axes. For 3. it would be quite difficult, the alpha way won't work because the arrow is one shader used for all players. Modifying it directly would affect all of your teammates as well. Ragdolls and physics in cod4 are shit because they're local, not server-side so for example if a brick is in one place on your computer, it might be in a completely different place for someone else(in theory).
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
Who is online
Users browsing this forum: No registered users and 16 guests