OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: zsa_zsa_rasputin on 20 Aug 2002, 13:29:17

Title: Ha ha - first thread!!! :P
Post by: zsa_zsa_rasputin on 20 Aug 2002, 13:29:17
OK.
My problem SOUNDS fairly simple - but still - have tried several "solutions" which SHOULD but havent worked...!  :(
Here is the problem in it's entirety:

During this mission your character (Player) has to capture an enemy spy. When your reach within a certain distance of him and you aren't in a vehicle - an external script triggers and you capture him.
The spy becomes unarmed and a member of your group.

The problem is - I want a small cutscene to be linked with the "CAPTURE" like at the end of the Red Hammer campaign when you capture those officers. Except - I want the player to perform certain actions (Ie. "Strokegun" on the spy).

Now I've tried "DisableUserInput" to try and get the player unit to move and attack, but this hasnt worked.

Instead - I've resorted to using a "Stand in" who teleports from a remote location to the player's position to attack the spy. THIS part of the plan works, and the camera targets him for the duration of the cutscene, then cuts back to the player (First person).

However - THE ACTUAL PROBLEM is that the "stand in" actor unit who teleports in won't move or attack the spy unit.
In fact - he just stands there in combat stance and looks like a lemon.

Please help!!!
This is the only thing I need to sort before I can release the mission for Beta testing!!!

In hope,  :-\

Dan  ;D
Title: Re:Ha ha - first thread!!! :P
Post by: Black_Feather on 20 Aug 2002, 13:46:28
I posted this on the other board before it went  :( remember to use the problem solved button.

actor addmagazine "strokegun"
actor addweapon "strokegun"
actor dowatch badguy
actor dotarget badguy

actor action ["strokegun"]
@unitready actor
badguy setdammage 1
Title: Re:Ha ha - first thread!!! :P
Post by: zsa_zsa_rasputin on 20 Aug 2002, 13:53:14
Ah ha ha!
I quote myself as saying: "have tried several "solutions" which SHOULD but havent worked...!"

Now although the stand in teleports in correctly, the player teleports out correctly and the camera targets the stand in correctly... EVEN THOUGH I HAVE given the stand in the "strokegun" weapon and ammo (And the "Strokefist"), and told him to attack the spy unit, with the commands you have already mentioned he doesnt respond to them!

THATS the problem - he doesn't obey orders!

Thanks for trying though - I'll try and remember to bring the script for it next time I'm online :)

Problem still unsolved  :-\

Dan  ;D
Title: Re:Ha ha - first thread!!! :P
Post by: Black_Feather on 20 Aug 2002, 14:01:31
oh it works for me, have you disabled his AI or anything?
Title: Re:Ha ha - first thread!!! :P
Post by: dismas on 21 Aug 2002, 00:23:35
As a small note, I'm sure you're probably aware of... camCreate'ed ai are ai-less.
same as if you disableAI'ed move, autotarget, target, etc.

Personally, I don't know the answer to your problem. ;)
I'm guessing playMove doesn't work?
Title: Re:Ha ha - first thread!!! :P
Post by: _hammy_ on 21 Aug 2002, 01:26:24
Ha ha - first thread!!! :P <-- ummmmm good for you  :-\
Title: Re:Ha ha - first thread!!! :P
Post by: KTottE on 21 Aug 2002, 10:07:57
Good point there dismas.
Zsa Zsa, make sure you are not camCreating the unit in question, rather use CreateUnit, since they will have AI.
If you have pre-placed the unit in the editor however, it will be trickier.
Title: Re:Ha ha - first thread!!! :P
Post by: zsa_zsa_rasputin on 21 Aug 2002, 13:53:15
nope - he's not camcreated - he's just stuck in a desolate part of the map in the editor  :-\
I haven't disabled his AI, there is nothing to say that he SHOULDNT work...!
Has anyone got an example script that they KNOW works that I could modify or something?

All he needs to do is teleport to where the player is as the player teleports to his desolate location, attack another unit, and then swap back with the player again in a cutscene...

Anyone...?  :'( PLEASE!?!!?

Dan  ;D

Ps. Hammy - Celebrating insignificant things makes the world seem a better place  :P  ;D
Title: Re:Ha ha - first thread!!! :P
Post by: zsa_zsa_rasputin on 22 Aug 2002, 14:10:10
Anyone got any ideas as to why this editor-placed, teleporting unit is completely unresponsive to commands?
(I can't use my PC at the mo - so I can't post an attachment of the code for you to look at - but I'm CERTAIN it should work)

Anyone? Please? HELP!!!  ???

Dan  ;D
Title: Re:Ha ha - first thread!!! :P
Post by: Black_Feather on 22 Aug 2002, 17:15:29


[This Attachment has been Deleted By Routine Maintenance]
Title: Re:Ha ha - first thread!!! :P
Post by: Messiah on 22 Aug 2002, 19:07:49
unitname playmove "combatstrokegunend"

are u sure you are using the correct syntax to make him hit the guy?  ::) thats the one i always use and it works

you dont have to disable AI and a stand in works fine for when i use it  - camcreate also works as well (why shouldnt it)

:thumbsup:
Title: Re:Ha ha - first thread!!! :P
Post by: Gastovski on 24 Aug 2002, 23:08:08
Ha ha - first thread!!! :P - But it wasn't the first thread on the board...

Oh and i had the same problem with dummy people. It ended up working though...
Title: Re:Ha ha - first thread!!! :P
Post by: zsa_zsa_rasputin on 04 Sep 2002, 15:15:02
oh but it WAS the first thread (Look at the date of the original posting)
You'll notice threads are repaced at the top of the board as more people post :P

Dan  ;D
Title: Re:Ha ha - first thread!!! :P
Post by: Black_Feather on 04 Sep 2002, 15:24:30
hmmm anyway, did you get your problem sorted?
Title: Re:Ha ha - first thread!!! :P
Post by: zsa_zsa_rasputin on 05 Sep 2002, 12:02:52
no -not yet, but I have some stuff still to try (My PCs been down, so I have some stuff to sort out and try, then I will either SOLVE this thread, or come back for MORE HELP!!!

Dan  ;D
Title: Re:Ha ha - first thread!!! :P
Post by: YankeeTanker on 07 Sep 2002, 01:54:09


  Ok..  I am really going out on a limb here..

  I am having a problem with a campaign that I am making as well.  The problem is after I replaced some bad syntax with some good syntax the game never updated... (i.e. - I erased the original sound file out of existance and replaced it with a new one and the game mystically and mysteriously still used the sound file that didn't exist).  This is after I completely turned the game off and replaced everything and restarted the game and loaded the campaign again and everything.. So I gave up and am letting it as part of the mission.

   The point to all of this is.. have you tried starting a completely NEW script with the correct scripting and inserting it into the files that it needs to be in and just getting rid of the old one all together.

  Like I said it is a rather bizarre thing that happened to me.. but it is possible the you somehow managed to do the same thing I did... it's a lotta work but it is still a possibility.. I guess.. figured it was worth a shot.

  Anyhow.. Good Luck

  YankeeTanker.
Title: Re:Ha ha - first thread!!! :P
Post by: zsa_zsa_rasputin on 10 Sep 2002, 12:16:12
I totally get what you mean there...!
Err - If In dire straits I'll consider it - but I've already done that twice with this mission for OTHER bugs...!!!
So I THINK I MAY have this sorted (I had the PC back BREIFLY - and things were looking promising - but now it's Unavailable AGAIN!!!  >:()

Anyway - Thanks for all your help guys (and any gals)  :)

Dan  ;D

ps. Will be back ASAP to SOLVE or RETRY!!!