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

Members Online

»
0 Active | 100 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 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: How to move model to origin?
TrikX
General Member
Since: Jul 7, 2012
Posts: 129
Last: Dec 31, 2016
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Sunday, Feb. 9, 2014 10:32 am
Basically what i want to do is for example to move model on Cod4 MP map from the bottom corner of the room, or somewhere else, to the upper corner of the room in a straight line, like shown in the picture.



It doesn't have to have origin, i placed it only for this example, it can also be a script with XYZ coordinates, i just don't know how to do it!
moveX, moveY and moveZ just doesn't do it, i want it to go straight! [banghead]

Is it possible?
Thank you!

edited on Feb. 9, 2014 03:33 am by denomajstor
Share |
3st0nian
General Member
Since: Jan 14, 2008
Posts: 291
Last: Dec 4, 2017
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Sunday, Feb. 9, 2014 11:13 am
MoveTo( point, time, acceleration time, deceleration time)

1 : point- The point to move the entity to
2 : time- The time to move the entity in seconds
3 : acceleration time- The time spent accelerating
4 : deceleration time- The time spent decelerating



edited on Feb. 9, 2014 04:13 am by 3st0nian
Share |
TrikX
General Member
Since: Jul 7, 2012
Posts: 129
Last: Dec 31, 2016
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Sunday, Feb. 9, 2014 04:15 pm
Thanks for this, but now i'm having an other problem!

I made that model (script_model), made the script with (moveTo)
and it doesn't work!
So i tried with linking a script_brushmodel to it, still nothing, tried to move it to an origin using target, nothing, tried using co-ordinates, nothing, then i started thinking that the script is not good, so i tried with (iprintln) and i get the message only when i step on the trigger!
After everything i tried, i placed insted of moveTo, moveZ, and the model is moving, i get all the messages!

Can someone tell me why it's not working please?

Here is the script i made!

Code:
move_model()
{
ghost_mo = getent ("gh_mod","targetname"); //ghost model
trig = getent ("gh_trig","targetname"); //trigger

trig waittill ("trigger");
iprintlnbold("Trigger triggered");
ghost_mo moveto ((88, 392, 184), 1, 2, 3);
ghost_mo waittill ("movedone");
iprintln("model moveto finished");
}
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11672
Last: Apr 20, 2024
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoD4 MP Mapping
Posted: Sunday, Feb. 9, 2014 04:50 pm
try this:
in your map:
create a script origin at the location you want the model to move to
select your model - then the origin and press ctrl-k to link them (order is important)
Code:
move_model()
{
level.ghost_speed = 2;

ghost_mo = getent ("gh_mod","targetname"); //ghost model
temp = getent (ghost_mo.target,"targetname"); // where its going
ghost_mo.dest = temp.origin;
ghost_mo.start = ghost_mo.origin;

trig = getent ("gh_trig","targetname"); //trigger

trig waittill ("trigger");
iprintlnbold("Trigger triggered");
self moveto (self.dest, level.ghost_speed, 0.1,0.1);

wait level.ghost_speed;
iprintln("model moveto finished");
}


you can do other things like show and hide the model until the trigger happens and once the move is done...
hope this helps
[angryalien]

Share |
3st0nian
General Member
Since: Jan 14, 2008
Posts: 291
Last: Dec 4, 2017
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Sunday, Feb. 9, 2014 05:08 pm
ghost_mo moveto ((88, 392, 184), 1, 2, 3);

Total movetime must be more or equal to accerelation time plus deceleration time.

So either
ghost_mo moveto ((88, 392, 184), 5, 2, 3);
OR
ghost_mo moveto ((88, 392, 184), 1);

Also with Stryders method instead of ctrl+k you must press W as first key combination works only in vCoD and UO.
Share |
TrikX
General Member
Since: Jul 7, 2012
Posts: 129
Last: Dec 31, 2016
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Sunday, Feb. 9, 2014 06:25 pm
attachment: image(821.0Kb)
I'm not new to mapping, i just don't understand why everything is working fine, only (moveto) doesn't!
StrYdeR, i know your script works fine for sure when i see it, but it doesn't work for me, and i don't know why! [banghead]
I even tried it with different models, on a different map and still nothing, only thing i get in game is the message "Trigger triggered" when i step on the trigger! After that nothing happends!
And i know how to hide and show the model, that's easy!
Share |
TrikX
General Member
Since: Jul 7, 2012
Posts: 129
Last: Dec 31, 2016
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Sunday, Feb. 9, 2014 06:29 pm
Model is script_model
trigger is trigger_multiple
origin is up, and it's welded in a good order!
I have 3 more ghost models on map, but they are just moving straight, and they work fine, but this is driving me crazy! [banghead]
Share |
TrikX
General Member
Since: Jul 7, 2012
Posts: 129
Last: Dec 31, 2016
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Monday, Feb. 10, 2014 10:15 pm
StrYdeR, your script is working, but it doesn't move the model!
I put also ghost_mo hide(); at the end to see if he will hide it, and i get the message ("model moveto finished) and it hides him, but the model stays where it was! [confused]
Share |
3st0nian
General Member
Since: Jan 14, 2008
Posts: 291
Last: Dec 4, 2017
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Tuesday, Feb. 11, 2014 01:45 pm
Code:
self moveto (self.dest, level.ghost_speed, 0.1,0.1);

should be
Code:
ghost_mo moveto (ghost_mo.dest, level.ghost_speed, 0.1,0.1);
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD4 MP Mapping
Posted: Tuesday, Feb. 11, 2014 01:48 pm
Try a different model?

Don't know what model you're using, whether it is an import or something, but it might have bones still in it, which may stop it from being moved?

Thanks, Ukdjaj[thumbs_up]
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP Mapping

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

»