Data Realms Fan Forums
http://868000.nnhp.asia/

[My Questions for scene making]
http://868000.nnhp.asia/viewtopic.php?f=8&t=15663
Page 1 of 1

Author:  Franchan [ Wed Jul 01, 2009 1:51 am ]
Post subject:  [My Questions for scene making]

I know this has probably been asked but i couldnt find it anywhere in the search or wiki

does anyone know how to make team sensitive doors? [Like team 1 can go in team 1 doors but team 1 doors wont open for team 0 so team 0 has to shoot down team 1's doors] <----read carefully please

How do i do it :???:
can you write it step by step? im kindof a handicapped person [-.-]

If it is in lua, how do i attach the lua code to the scene?

Thanks :oops:

EDIT: It seems that i have many problems and i dont want to make a new topic every time i have a problem so i just changed the title.

Author:  Grif [ Wed Jul 01, 2009 1:53 am ]
Post subject:  Re: [Team sensitive doors]

Uh, doors are team sensitive?

To change the team, just go to your scene code, and wherever the addchildobject = adoor code is, add this line:

Team = 1.

Team 1 is green team, meaning it'll open for green. Team 0 is red, and anything else is neutral, which (probably) will open for neither team.

Author:  Franchan [ Wed Jul 01, 2009 1:59 am ]
Post subject:  Re: [Team sensitive doors]

one more think please :oops:
sorry. lol.

i was building a scene when i noticed i could only put robot1 robot2 and brainbots. for the actors.
whats up with that?

Author:  Grif [ Wed Jul 01, 2009 2:09 am ]
Post subject:  Re: [Team sensitive doors]

The scene editor by default only includes base.rte content.

All coalition, dummy, and mod faction actors are loaded in seperate .rtes and therefore it takes some shenanigans to get them into the scene editor.

What you can do is place actors from base.rte, then go into the scene file and replace the presetnames from "Robot 1" to "Soldier Heavy", for example.

Author:  Franchan [ Wed Jul 01, 2009 11:17 am ]
Post subject:  Re: [Team sensitive doors]

Grif wrote:
The scene editor by default only includes base.rte content.

All coalition, dummy, and mod faction actors are loaded in seperate .rtes and therefore it takes some shenanigans to get them into the scene editor.

What you can do is place actors from base.rte, then go into the scene file and replace the presetnames from "Robot 1" to "Soldier Heavy", for example.


okay. thanks for answering. it helped alot :grin:

1. is there any way i can just add them in the scene editor actors.
like create new lines [instead of base.rte/actors/robots its browncoats.rte/actorsoldier]

2. using this code


if self.SpawnTimer:IsPastSimMS(5000) then
local ship = CreateACDropShip("Drop Ship MK1");
local dummy = CreateAHuman("Dummy");
local gun = CreateHDFirearm("AK-47");
dummy:AddInventoryItem(gun);
ship:AddInventoryItem(dummy);

- Can i duplicate this code without having them clash together?
- How can i make this spawn a [Browncoat] with a [M1600] and a [Heavy Digger]
-and do i need to make "Itemlists" for each class?

...
i have more questions but ill leave it there for now
[Please dont think me as a hopeless idiot that is too lazy to do things himself. I have tried many things and searched through cortex command missions for examples and references but nothing worked. This is my last resort before i give up.]

Author:  Grif [ Wed Jul 01, 2009 7:35 pm ]
Post subject:  Re: [My Questions for scene making]

You can add them to the scene editor by copying what's in the Index.ini of the .rte you're trying to reference, and pasting that into Base.rte/Index.ini.

http://datarealms.com/wiki/index.php/Activities.ini

Basically, use the more indepth tutorial in the first part of that guide (but not the activities.ini editing).

As for your second question, this is going to take a little bit of an introduction to lua.

local ship = CreateACDropShip means that the local (as opposed to global) variable ship is, from this point on, going to be a pointer to an ACDropShip. That means that when you call variable "ship" in later lua, it's going to "know" that it's an acdropship. What goes in the parentheses after Create<whatever>()
is the PRESETNAME and the .RTE that what you're trying to reference is in.

If I want a browncoat, I'd just do this:
local bcoat = CreateAHuman("Browncoat Light","Browncoats.rte");

Same thing for the craft and guns. You do not need to create a weapon list, it's just a more efficient way of writing code. However, be sure that you're referencing the correct .rte; the m1600 is defined in ronin.rte, for example, not browncoat.

And yes, you should be able to duplicate that code, because local variables are only used within their own block of code. However, I'd recommend against using the same spawntimer; in the create function, instead of "self.SpawnTimer = Timer();", I'd say put self.spawntimer1 = Timer();, self.spawntimer2 = Timer(); and etc, for however many spawns you want to have. Then, replace if self.SpawnTimer with if self.spawntimer1 in the very top of the spawning code.

Author:  Franchan [ Wed Jul 01, 2009 10:39 pm ]
Post subject:  Re: [My Questions for scene making]

Wow...
thanks. took alittle referencing but i figured out how to make ship timers.
thanks a ton.
:grin:
your really helping me for my first mission

(^ - ^)

Author:  LowestFormOfWit [ Wed Jul 01, 2009 11:22 pm ]
Post subject:  Re: [My Questions for scene making]

This does bring up the fair point that the Scene Editor should just load -all- default content vs. those only in Base.rte.

Author:  Franchan [ Thu Jul 02, 2009 3:35 pm ]
Post subject:  Re: [My Questions for scene making]

sorry to bother again.
im almost done the mission but so far i have 1 unsolved problem thats keeping me from finishing it [dont worry. by the time i finish my first mission. i can probably do the second mission on my own with this topic as reference]

so i have this mission im making.
but when i play, it says win.
then i won and i reset
and it auto wins me again.
whats up with that? i have an enemy brain...

heres the specific code

-- Check if the CPU brain is dead
if not MovableMan:IsActor(self.CPUBrain) and ActivityMan:ActivityRunning() then
self.CPUBrain = nil;
-- Proclaim player winner end
self.WinnerTeam = Activity.TEAM_1
-- Finito!
ActivityMan:EndActivity();
end
end



and theres attachments for clearer image

Attachments:
File comment: This is my flawed mission
Chan.rte.zip [8.15 KiB]
Downloaded 302 times

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/