Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 66 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: Player Controlled Video Camera Monitors
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Sunday, Feb. 27, 2011 11:14 pm
serthy writes...
Quote:
look at this topic
http://modsonline.com/Forums-top-135630.html
and watch brax script and the other link in there
this way you can have a model receiving damage from every weapon different


Thanks for the post. It helped solve a few issues.
I went through the topic and related topics and found a really crappy way to do it, but it works. I will have to experiment with many more things, because I really don't like how it is at the moment.

Appreciate the help so far though. [wave]
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Monday, Feb. 28, 2011 12:56 am
not this fast dude :o

i wrote lil script

here the result:

http://de.xfire.com/profile/serthy/screenshots/?view%23111270514

u disable ur weapon
spawn a clone
link urself to one of ur cameras
set ur model -10000 or hide (dunno how this is done)
limit ur viewangles
switch trough the cams
unlink urself
delete clone
set urself to startposition

i thought it would be harder but its not that difficult for skilled scripter
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Monday, Feb. 28, 2011 03:06 am
I'm not sure what I'm looking at in your link, it takes me to COD2 screenshots but I don't understand.

I have been able to accomplish most of what is on that list.



u disable ur weapon

spawn a clone (I spawned a simple model in its place)

link urself to one of ur cameras (Did not link but Moved the player to that positions with options to move to another camera or leave the cameras)

set ur model -10000 or hide (I set the model to NOTHING, but I can still shoot the player even though the model isn't there, if I shoot at teh cameras position, blood comes out and everything, need to fix that)

limit ur viewangles (Didn't do this, but created Vision while player is viewing, looks great)

switch trough the cams (Allows this)

unlink urself (Didn't need to do this)

delete clone (Did that)

set urself to startposition (Respawned the player at the same position player entered the monitor at)


I did all these things, and the only part I am disappointed with, is the model the player left behind when entering the monitor, and that the player can still be hurt even though the player has no model and is in the cameras position. [ohwell]
Share |
Samuel033
General Member
Since: Dec 10, 2009
Posts: 484
Last: Dec 25, 2015
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Monday, Feb. 28, 2011 09:35 am
For damage perhaps the simplest way to get around it is to set a value on the player. self.inCamera = true or something like that. Then in the damage callback check for it. If true then do nothing in the callback and return.
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Monday, Feb. 28, 2011 09:00 pm
Samuel033 writes...
Quote:
For damage perhaps the simplest way to get around it is to set a value on the player. self.inCamera = true or something like that. Then in the damage callback check for it. If true then do nothing in the callback and return.


I don't know how to do that. [ohwell]

I think I'm giving up on this. It is too much guessing, and I feel like I've ran the map and rebuilt the FF over hundreds of times just to guess at code. It's just too much. [sad]

I appreciate the help on it regardless.
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Monday, Feb. 28, 2011 10:12 pm
ehm
how do i hide my playermodel on cam? didnt figured it out yet
self hide() only hides my headmodel
and with detacheall() game crashes :|

and after hiding how i set my old playermodel?
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Monday, Feb. 28, 2011 11:52 pm
serthy writes...
Quote:
ehm
how do i hide my playermodel on cam? didnt figured it out yet
self hide() only hides my headmodel
and with detacheall() game crashes :|

and after hiding how i set my old playermodel?


I set the model to "nothing". Problem is, the player can still be hurt or damaged even though you can't see the player. One of the problems I don't know how to fix.

Code:
	player setModel ("");


To reset your old player model you have to respawn the player. At least that is how I got it working. Spawn a script origin where you want the player to spawn when he leaves the camera. Then spawn the player there.
Code:
	player spawn ( level.spawnPointHome.origin, level.spawnPointHome.angles );
	player maps\mp\gametypes\_class::giveLoadout (player.team, player.class);
	player SetNormalHealth (level.playersHealth);


That was my code. I used "level.spawnPointHome" as the players origin and angles, and stored it in that variable. Then I stored his original health in "level.playersHealth". That way when he comes out of the camera mode, he still has the same amount of health when he went in if he wasn't hurt.




I don't understand what "ClonePlayer" even does.
Code:
ClonePlayer();

How do you use it? What is it supposed to do when you use it? I can't find any docs on what it does or anything about it, but vague descriptions.
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Tuesday, Mar. 1, 2011 12:17 am
this was my screeny
when u use cloneplayer() u spawn a playermodel that is exactly the same like your current model it means:
when u jjump and clone ur model stays jumping in the air
when you walk you clone also walks slowly and so on
on my screenshot this are all only clones from my model
clones cannot have any weapons in their hand
so i did disable weapon and cloneplayer so it looks in cod2 likle hes planting the bomb
this model is animated so it looks better than a simple model
(okay i dont know anything on cod4 models)

mh isnt there another way to except of respawning?, then u dont get ur ammonition and maybe ur killstreak ends then, i dont know
i thought to set the players model -100000 below the cam is good but no glue about doing this

later ill try to do what samuel said, it should work, but bit busy now and not this good scripter ._.
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»