Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Changing texture via config

  1. #1
    Can textures be assigned via config for Soldier models as well as in p3d?

    Explanation (just in case):

    soldierA.p3d
    (using soldierA_co.paa and a face/hands hhl.paa, soldierA_co.paa is one merged 2048x2048 texture, model properly working, UV's all set, etc. These are Desert units)

    Now can I; via config, swap out this soldierA_co.paa with soldierAwoodland_co.paa?

    If so can I get an example?

    Ive been working on some RAC SF units for months, painstaking at times trying to optimize them, merging textures, transferring UV's, etc. Would really hate to have two P3d's for each unit (one Desert and one Temperate), I will if I have too, but if there is a way around that I'd appreciate any help anyone can lend.
    BilOlson aka Storm

  2. #2
    http://fab.ofp.free.fr/Tutorials/Hidden_Selections.htm

    Quote Originally Posted by [b
    Quote[/b] ]Well, the basic ERA "style" was simply the BI-sample model plus the ERA section for easier handling of the added elements (+1 section).
    When we included mateck's custom skin, we added 3 more sections for texture replacement via setObjectTexture (+3 sections). 4 more sections got added when we introduced the numbers plus flags.
    http://www.flashpoint1985.com/cgi-bin....t=74879

    script code

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if&#40;_panelling &#62; 138&#41; then {_buggy setObjectTexture &#91;1, &#34;&#92;Buggy3&#92;Tex&#92;camo.pac&#34;&#93; ;};[/QUOTE]

    http://community.bistudio.com/wiki/setObjectTexture

  3. #3
    Sergeant
    Join Date
    Sep 27 2002
    Location
    Kalamazoo,MI
    Posts
    111
    Author of the Thread
    Awesome, Thank you Q, much appreciated

  4. #4
    oida ouk eidos raedor's Avatar
    Join Date
    Sep 30 2002
    Location
    Germany, Austria
    Posts
    5,284
    Note that the class inheritance doesn&#39;t work the way it is shown in the tut.

  5. #5
    Sergeant
    Join Date
    Sep 27 2002
    Location
    Kalamazoo,MI
    Posts
    111
    Author of the Thread
    Ok, thanks for the sidenote. It&#39;ll take a few days to get my head wrapped around this so I&#39;m sure Ill be back with questions.

  6. #6
    Sergeant
    Join Date
    Sep 27 2002
    Location
    Kalamazoo,MI
    Posts
    111
    Author of the Thread
    Ok I&#39;m back. Thanks again for the hints fellas. I have everything working, the way I intended it with standard eventhandler. Now I have another problem on the horizon. Which is probably an easy fix. I know for this to be properly implemented and to work properly in MP, etc I&#39;m going to have to/ want to use EEH. Every time I try to incorporate it, it totally hates my script(s) the Handlers call, errors upon mission start. ***With Standard EH, works like a charm. With EEH, not ***so good. So I&#39;m guessing it&#39;s my extreme novice scripting.

    dcu.sqs *** ***<---- called by EventHandler, works great. EEH, doesn&#39;t.
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    _unit = _this select 0

    &#59;making sure script is running, debug
    _unit sidechat &#34;is this running, this is a test?&#34;

    ; Assign uniform default
    _unit setObjectTexture &#91;0,&#34;&#92;asp_resSFv1&#92;data&#92;asp_sold ier2dcu_co.paa&#34;&#93;

    Exit

    [/QUOTE]

    There is an identical script for the Temperate uniforms as well.

    I have had the EEH sorta working, upon entering game the section (body) is totally transparent. Heres the weird thing, as soon as I put anything into the units init line in editor with the word "this" (example: "This addWeapon "M136"), uni/body appears and is working as it should. I however do not ever get the sidechat line I put in to make sure script was running.

    Any help is greatly appreciated. Also does anyone see a foreseeable problem that I&#39;m not seeing by doing things this way? Foreseeable problems in MP? JIP? Respawn?, etc.

  7. #7
    XEH only allows SQF

    (not sure and didnt check)

  8. #8
    Sergeant
    Join Date
    Sep 27 2002
    Location
    Kalamazoo,MI
    Posts
    111
    Author of the Thread
    Ahh ok, Ill have to read up on it. Thanks again Q.

  9. #9
    If you want to do this via config instead of scripting, use the parameter hiddenSelectionsTextures[]. Example:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
    class myDude
    {
    hiddenSelections&#91;&#93; = {&#34;shirt&#34;};
    hiddenSelectionsTextures&#91;&#93;= {&#34;&#92;myaddon&#92;shirt.paa&#34;};
    ...
    };
    [/QUOTE]
    HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP

  10. #10
    Sergeant
    Join Date
    Sep 27 2002
    Location
    Kalamazoo,MI
    Posts
    111
    Author of the Thread
    Thanks General i have everything working 100% now, hiddenSelectionsTexture, nice hadn&#39;t seen that one yet.
    I used method explained above. hiddenSelections[], sections[]. Then I wrote a sqf with the setObjectTexture in it. Incorporated XEH Init and now everything is working as it should. Desert units are Desert and Temperate Units are temperate, all using one set of models.

    All worked much first time I tried it following directions and links above.

    I did run into a problem or two though with Extended Eventhandlers but found the fix in another thread and Q pointed out I needed SQF and not SQS. Also had to read up on SQF&#39;s, but these were fine 1st time I ran also too....

    Thanks to everyone for the tutorials, and the linkage to said tutorials

    Still haven&#39;t been able to find out if I will be running into problems with this in MP, JIP, and Respawn scenarios. Might all be a wasted effort, but I do have the concept I was after working errorlessly. So I did learn quite a bit if this pans out not to work in one of those instances, now I&#39;m super experimenting with hiddenselections, proves to be quite useful...

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •